New issue
Advanced search Search tips

Issue 753841 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Array.prototype.toLocaleString should use a locale-aware separator

Reported by silv3rw...@gmail.com, Aug 9 2017

Issue description

UserAgent: 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:
 
Attached is a screenshot that shows the locale's separator setting in Windows.
separator.png
40.2 KB View Download

Comment 2 by e...@chromium.org, Aug 11 2017

Components: -Blink Blink>JavaScript
Components: -Blink>JavaScript Blink>JavaScript>Internationalization
Status: Available (was: Unconfirmed)
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
Project Member

Comment 5 by sheriffbot@chromium.org, Aug 16

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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
Status: Available (was: Untriaged)

Sign in to add a comment