x/text/number: understands specific BCP-47 u-nu-extensions, but not general categories #54090
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Impacts
x/text/language
andx/text/number
What version of Go are you using (
go version
)?go1.18, go1.19rc1,
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputAlso, Go playground
What did you do?
https://go.dev/play/p/PEXNpU0N-lf
What did you expect to see?
"For example, in Tamil the default numbering system is latn, the native numbering system is tamldec and the traditional numbering system is taml." (ref1)
Therefore, ta-u-nu-native should display the same result as ta-u-nu-tamldec
What did you see instead?
ta-u-nu-native uses the default "latn", rather than tamldec.
Additional examples would look like "zh-u-nu-finance" but I couldn't get any "zh" locale strings to print in anything other than latn
Resolving
Ideally, this should be supported. If it isn't, an error would be good. But there is no general way to know that the specified number system extension in the locale string is invalid or ignored, so this relates to #53872 and the returned Confidence.
Also, for cases like "example-u-nu-finance" or "example-u-nu-traditio": "If the traditional numbering system is not defined, applications should use the native numbering system as a fallback. If the financial numbering system is not specified, applications should use the default numbering system as a fallback."
(ref2)
Additional references:
cldr-41.0/common/bcp47/number.xml
The text was updated successfully, but these errors were encountered: