aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/unicode
AgeCommit message (Collapse)Author
2014-09-08build: move package sources from src/pkg to srcRuss Cox
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.
2014-08-26unicode: use go generate instead of make to create tables.goRob Pike
LGTM=mpvl, rsc R=mpvl, rsc CC=golang-codereviews https://golang.org/cl/135820043
2014-08-25unicode/maketables: add -output flag, buffer output, use gofmtRob Pike
Simplify the invocation (and speed it up substantially) in preparation for move to go generate. LGTM=bradfitz, mpvl R=mpvl, bradfitz, josharian CC=golang-codereviews https://golang.org/cl/135790043
2014-08-18unicode: strconv: regexp: Upgrade to Unicode 7.0.0.Marcel van Lohuizen
LGTM=r, bradfitz R=r, bradfitz CC=golang-codereviews https://golang.org/cl/127470043
2014-07-16src, misc: applied gofmt -s -wRobert Griesemer
Pending CL 113120043. LGTM=dave R=golang-codereviews, dave CC=golang-codereviews https://golang.org/cl/112290043
2014-05-11unicode: fix doc typoPéter Surányi
LGTM=robert.hencke, iant R=golang-codereviews, robert.hencke, iant CC=golang-codereviews https://golang.org/cl/96230043
2014-03-23unicode/utf8: minor code simplificationRui Ueyama
It's a little bit waste to check if r is not a surrogate code point because RuneError is not a surrogate code point. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/79230043
2014-03-23unicode/utf16: remove unnecessary type conversionsRui Ueyama
LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/79080044
2014-03-19unicode: minor cleanupRui Ueyama
These test cases are redundant because TestSimpleFold tests all possible rotations of test data, so no need to add rotated strings. Also updated the comment as it's guaranteed that SimpleFold returns values in increasing order. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/77730043
2014-02-18unicode: upgrade to Unicode 6.3.0Marcel van Lohuizen
This is a relatively minor change. This does not result in changes to go.text/unicode/norm. The go.text packages will therefore be relatively unaffected. It does make the way for an upgrade to CLDR 24, though. The tests of all.bash pass, as well as the tests in go.text after this update. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/65400044
2014-01-31unicode: delete appearance of unused LowerUpper term from commentRob Pike
If a LowerUpper ever happens, maketables will complain. Fixes #7002. LGTM=dave R=golang-codereviews, dave CC=golang-codereviews https://golang.org/cl/59210044
2013-12-17all: add missing copyrightChaiShushan
R=golang-dev, iant CC=golang-dev https://golang.org/cl/43290043
2013-12-16unicode/utf16: add explicit test for decoding invalid runes.Dave Cheney
The EncodeRune test exercises DecodeRune, but only for runes that it can encode. Add an explicit test for invalid utf16 surrogate pairs. Bonus: coverage is now 100% unicode/utf16/utf16.go: IsSurrogate 100.0% unicode/utf16/utf16.go: DecodeRune 100.0% unicode/utf16/utf16.go: EncodeRune 100.0% unicode/utf16/utf16.go: Encode 100.0% unicode/utf16/utf16.go: Decode 100.0% total: (statements) 100.0% R=golang-dev, r CC=golang-dev https://golang.org/cl/39150044
2013-12-16unicode/utf16: add explicit tests for IsSurrogateDave Cheney
Update #6956 Add tests for IsSurrogate. R=golang-dev, r CC=golang-dev https://golang.org/cl/42570043
2013-08-05undo CL 12486043 / ab644299d124Brad Fitzpatrick
Uglier. ««« original CL description all: use strings.IndexByte instead of Index where possible R=golang-dev, khr CC=golang-dev https://golang.org/cl/12486043 »»» R=golang-dev CC=golang-dev https://golang.org/cl/12485044
2013-08-05all: use strings.IndexByte instead of Index where possibleBrad Fitzpatrick
R=golang-dev, khr CC=golang-dev https://golang.org/cl/12486043
2013-07-24unicode: add "In" function to test membership of a runeRob Pike
The existing function, IsOneOf, is hard to use. Since the slice comes before the rune, in parallelism with the other Is functions, the slice is clumsy to build. This CL adds a nicer-signatured In function of equivalent functionality (its implementation is identical) that's much easier to use. Compare: unicode.IsOneOf([]*unicode.RangeTable{unicode.Letter, unicode.Number}, r) unicode.In(r, unicode.Letter, unicode.Number) R=golang-dev, adg CC=golang-dev https://golang.org/cl/11672044
2013-03-19unicode: modify a comment to the convention format.Oling Cat
R=golang-dev, r, rsc CC=golang-dev https://golang.org/cl/7869043
2013-03-19unicode: remove an extra spaceOling Cat
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7856044
2013-03-13unicode/utf8: fix insignificant typos in testsJeff R. Allen
Fixes #4972. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7649044
2013-02-21unicode: use new Scanner interface in table creationRob Pike
Update norm and local/collate as well. R=mpvl CC=golang-dev https://golang.org/cl/7395045
2013-01-09utf8: fix typo.Andrey Mirtchovski
R=golang-dev, iant CC=golang-dev https://golang.org/cl/7063056
2012-10-31unicode: move unicode and related packages to Unicode 6.2.0.Marcel van Lohuizen
R=r, mpvl CC=golang-dev https://golang.org/cl/6818067
2012-10-30gofmt: apply gofmt -w src miscRobert Griesemer
Remove trailing whitespace in comments. No other changes. R=r CC=golang-dev https://golang.org/cl/6815053
2012-09-21unicode: performance improvements (API change)Russ Cox
*** There is an API change here: the introduction of the LatinOffset int in the RangeTable struct. *** * Avoid checking Latin range multiple times for non-Latin runes. * Use linear search when it is faster than binary search. go test -calibrate runs the calibration for where the linear/binary crossover should be. benchmark old MB/s new MB/s speedup BenchmarkFields 36.27 41.43 1.14x BenchmarkFieldsFunc 36.23 41.38 1.14x The speedup here is evenly split between the linear scans and the LatinOffset change. Both are about 1.07x. R=r CC=bradfitz, gobot, golang-dev https://golang.org/cl/6526048
2012-09-17unicode/utf8: add ExamplesSanjay Menakuru
R=golang-dev, r CC=adg, golang-dev https://golang.org/cl/6493124
2012-08-30cmd/gc: string conversion for surrogatesRob Pike
This is required by the spec to produce the replacement char. The fix lies in lib9's rune code. R=golang-dev, nigeltao, rsc CC=golang-dev https://golang.org/cl/6443109
2012-08-08all: make Unicode surrogate halves illegal as UTF-8Rob Pike
Surrogate halves are part of UTF-16 and should never appear in UTF-8. (The rune that two combined halves represent in UTF-16 should be encoded directly.) Encoding: encode as RuneError. Decoding: convert to RuneError, consume one byte. This requires changing: package unicode/utf8 runtime for range over string Also added utf8.ValidRune and fixed bug in utf.RuneLen. Fixes #3927. R=golang-dev, rsc, bsiegert CC=golang-dev https://golang.org/cl/6458099
2012-07-19unicode/utf8: reject out-of-range runes.Rob Pike
Surrogates are still admitted, but I have sent mail to golang-dev on that topic. Fixes #3785. R=golang-dev, rogpeppe, iant CC=golang-dev https://golang.org/cl/6398049
2012-05-22unicode: fix comment about variable typesRuss Cox
In both the web and command line tool, the comment is shown after the declaration. But in the code the comment is obviously before. Make the text not refer to a specific order. R=r, dsymonds CC=golang-dev https://golang.org/cl/6206094
2012-03-06unicode/utf16: delete dependence on package unicodeRob Pike
In the test, verify the copied constants are correct. Also put the test into package utf16 rather than utf16_test; the old location was probably due creating the test from utf8, but the separation is not needed here. R=golang-dev, bradfitz, rsc, rsc, r CC=golang-dev https://golang.org/cl/5752047
2012-03-06unicode/utf8: remove dependence on unicode.Rob Pike
The dependency was there only to pull in two constants. Now we define them locally and verify equality in the test. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5754046
2012-02-14cmd/go: a raft of fixesRuss Cox
* add -work option to save temporary files (Fixes issue 2980) * fix go test -i to work with cgo packages (Fixes issue 2936) * do not overwrite/remove empty directories or non-object files during build (Fixes issue 2829) * remove package main vs package non-main heuristic: a directory must contain only one package (Fixes issue 2864) * to make last item workable, ignore +build tags for files named on command line: go build x.go builds x.go even if it says // +build ignore. * add // +build ignore tags to helper programs R=golang-dev, r, r CC=golang-dev https://golang.org/cl/5674043
2012-02-10unicode: various documentation tweaksRob Pike
The comment on IsOneOf regarding Latin-1 was an implementation detail: when the function is called internally, that condition is true. It used to matter, but now the comment is a dreg. The function works fine if the character is Latin-1, so we just delete the comment. Fixes #2966. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5655047
2012-02-10unicode/utf8: document return value for decode errorsRob Pike
Also replace archaic definition of rune. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5654048
2012-02-06build: delete make paraphernaliaRuss Cox
As a convenience to people working on the tools, leave Makefiles that invoke the go dist tool appropriately. They are not used during the build. R=golang-dev, bradfitz, n13m3y3r, gustavo CC=golang-dev https://golang.org/cl/5636050
2012-02-04unicode: document large var blocks and the SpecialCase vars.David Symonds
Fixes #2772. R=golang-dev, r CC=golang-dev https://golang.org/cl/5631047
2012-02-03std: add struct field tags to untagged literals.Nigel Tao
R=rsc, dsymonds, bsiegert, rogpeppe CC=golang-dev https://golang.org/cl/5619052
2012-01-30build: remove Make.pkg, Make.toolRuss Cox
Consequently, remove many package Makefiles, and shorten the few that remain. gomake becomes 'go tool make'. Turn off test phases of run.bash that do not work, flagged with $BROKEN. Future CLs will restore these, but this seemed like a big enough CL already. R=golang-dev, r CC=golang-dev https://golang.org/cl/5601057
2012-01-17utf8.String: move to exp/utf8string.StringRob Pike
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5528115
2011-12-16various: use $GCFLAGS and $GCIMPORTS like Make doesMaxim Pimenov
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5489065
2011-12-08update tree for new default type ruleRuss Cox
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5448091
2011-12-05various: we don't cast, we convertRob Pike
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5437142
2011-12-05use new strconv APIRuss Cox
All but 3 cases (in gcimporter.go and hixie.go) are automatic conversions using gofix. No attempt is made to use the new Append functions even though there are definitely opportunities. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5447069
2011-11-08renaming_3: gofix -r go1pkgrename src/pkg/[m-z]*Rob Pike
R=rsc CC=golang-dev https://golang.org/cl/5345045
2011-11-08renaming_1: hand-edited files for go 1 renamingRob Pike
This contains the files that required handiwork, mostly Makefiles with updated TARGs, plus the two packages with modified package names. html/template/doc.go needs a separate edit pass. test/fixedbugs/bug358.go is not legal go so gofix fails on it. R=rsc CC=golang-dev https://golang.org/cl/5340050
2011-11-03os,text,unicode: renamingsRob Pike
This is Go 1 package renaming CL #4. This one merely moves the source; the import strings will be changed after the next weekly release. This one moves pieces into os, text, and unicode. exec -> os/exec scanner -> text/scanner tabwriter -> text/tabwriter template -> text/template template/parse -> text/template/parse utf16 -> unicode/utf16 utf8 -> unicode/utf8 This should be the last of the source-rearranging CLs. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5331066
2011-11-02all: sort importsRuss Cox
R=golang-dev, r CC=golang-dev https://golang.org/cl/5319072
2011-11-01src/pkg/[n-z]*: gofix -r error -force=errorRuss Cox
R=golang-dev, bsiegert, iant CC=golang-dev https://golang.org/cl/5294074
2011-10-25unicode, utf8, utf16: use runeRuss Cox
Everything changes. R=r CC=golang-dev https://golang.org/cl/5310045