Skip to content
New issue

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

x/text/language: language Matcher does not properly support zh_HK (Hong Kong) #34408

Open
pkpfr opened this issue Sep 19, 2019 · 1 comment
Open
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@pkpfr
Copy link

pkpfr commented Sep 19, 2019

What version of Go are you using (go version)?

$ go version
1.13

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Reproduces on all processors and architectures

What did you do?

Tried to match the following language header from Google Chrome:

zh-HK,zh;q=0.9,zh;q=0.8,en-GB;q=0.7,en;q=0.6,ja;q=0.5,th;q=0.4,en-US;q=0.3

https://play.golang.org/p/hQ_FUehpgoZ

What did you expect to see?

Language matcher returns the Hong Kong region and Traditional Chinese character set

What did you see instead?

Language matcher is unaware of the Hong Kong region and falls back to the next language (Chinese or Taiwanese). Does not return traditional character set unless zh-Hant or zh-TW is explicitly set in the language header.

@ALTree ALTree changed the title Language Matcher does not properly support zh_HK (Hong Kong) x/text/language: language Matcher does not properly support zh_HK (Hong Kong) Sep 19, 2019
@gopherbot gopherbot added this to the Unreleased milestone Sep 19, 2019
@toothrot toothrot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 20, 2019
@toothrot
Copy link
Contributor

/cc @mpvl who can weigh in on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants