We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version
go version go1.12beta2 linux/amd64 golang.org/x/text master (6c92c7d)
Yes.
go env
GOARCH="amd64" GOBIN="" GOCACHE="/home/dave/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/dave/Source/Go" GOPROXY="" GORACE="" GOROOT="/usr/lib/go-1.12" GOTMPDIR="" GOTOOLDIR="/usr/lib/go-1.12/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build800313732=/tmp/go-build -gno-record-gcc-switches"
package main import ( "fmt" "golang.org/x/text/language" ) func main() { region, _ := language.AmericanEnglish.Region() fmt.Println(region.ISO3()) // expect "USA", got "US" region, _ = language.LatinAmericanSpanish.Region() fmt.Println(region.ISO3()) // expect "ZZZ" (maybe?), got "419" }
The documentation states:
ISO3 returns the 3-letter ISO code of r. Note that not all regions have a 3-letter ISO code. In such cases this method returns "ZZZ".
ISO3166-1 alpha-2 in the first example, UN M.49 in the second.
Also worth noting that the docs should probably clarify ISO 639-3 vs. ISO 3166-1; "ISO" is ambiguously used for both.
The text was updated successfully, but these errors were encountered:
Looks like it was fixed 5 days ago by golang/text@d14c52b - can you verify?
Sorry, something went wrong.
Looks fixed from here. Thanks!
No branches or pull requests
What version of Go are you using (
go version
)?go version go1.12beta2 linux/amd64
golang.org/x/text master (6c92c7d)
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOCACHE="/home/dave/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/dave/Source/Go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go-1.12"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.12/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build800313732=/tmp/go-build -gno-record-gcc-switches"
What did you do?
What did you expect to see?
The documentation states:
What did you see instead?
ISO3166-1 alpha-2 in the first example, UN M.49 in the second.
Also worth noting that the docs should probably clarify ISO 639-3 vs. ISO 3166-1; "ISO" is ambiguously used for both.
The text was updated successfully, but these errors were encountered: