Array.prototype.toLocaleString should use a locale-aware separator
Reported by
silv3rw...@gmail.com,
Aug 9 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0 Steps to reproduce the problem: 1. run ['',''].toLocaleString() on a Windows machine with a german locale and default regional settings. What is the expected behavior? Output is ',', but should be ';' What went wrong? Chrome does not seem to check the system's locale setting in this case, while the spec [1] clearly states that "the list-separator String appropriate for the host environment’s current locale" should be used. IE11 and presumably Edge output '; ' for the test case, while Firefox exhibits the same issue as Chrome [2]. [1] https://tc39.github.io/ecma402/#sup-array.prototype.tolocalestring [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1388777 Did this work before? No Chrome version: 61 Channel: stable OS Version: any Flash Version:
,
Aug 11 2017
,
Aug 15 2017
,
Aug 16 2017
There's some discussion about changing the specification here as part of the ListFormat proposal at ECMA 402 [1] but it doesn't seem to have made it into the current draft spec [2]. I don't know if CLDR has data like "," and ";"--I only see [3], which is more like what I would expect linguistically (e.g., there's a space after the punctuation mark in their English example); I don't quite understand when a bare "," or ";" would be appropriate for a language like English or German. [1] https://github.com/tc39/ecma402/issues/33 [2] https://github.com/zbraniecki/proposal-intl-list-format [3] http://unicode.org/reports/tr35/tr35-general.html#ListPatterns
,
Aug 16
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 20
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by silv3rw...@gmail.com
, Aug 9 201740.2 KB
40.2 KB View Download