toLocaleString de-CH thousands separator format is wrong
Reported by
he...@saschaeggenberger.com,
Sep 8 2017
|
|||||
Issue description
Chrome Version : 61.0.3163.79
URLs (if applicable) : ALL
Other browsers tested:
Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
Safari: OK
Firefox: OK
IE: OK
What steps will reproduce the problem?
(1) Open Devtools
(2) Go to console
(3) Run `var number = 20000; number.toLocaleString('de-CH');`
What is the expected result?
20'000
What happens instead?
20’000
Please provide any additional information below. Attach a screenshot if
possible.
The toLocaleString function in Chrome uses the wrong apostrophe char for the swiss (de-CH) number format (thousands separator).
See also https://en.wikipedia.org/w/index.php?title=Decimal_mark§ion=12#Examples_of_use
,
Sep 8 2017
I think the reported value is actually correct, though another person who is more expert will reply shortly.
,
Sep 8 2017
Hi Chris, thanks for the fast reply. The reported value is wrong. As mentioned all major browsers are reporting the value correct. Chrome uses the following char: ’ But the right char would be: ' More sources: http://www.thefinancials.com/Default.aspx?SubSectionID=curformat https://lh.2xlibre.net/locale/de_CH/ Best wishes Sascha
,
Sep 8 2017
This is indeed working as intended. In Swiss German apostrophe is used for currency numbers while space is used for all other numbers. As we don't know whether the number represents currency or not we always use the first style. Note that the straight apostrophe is used for handwriting but shouldn't be used for digital communication. http://www.gutenberg.us/articles/thousands_separator There is also the unicode decimal separator key symbol (U+2396 ⎖) which might be appropriate but we use the regular U+2019 apostrophe.
,
Sep 8 2017
https://en.wikipedia.org/wiki/Decimal_mark has more on this.
,
Sep 8 2017
,
Sep 8 2017
More proof that this is actually a bug. Even Swiss Banks are using the U+0027 char instead of U+2019. https://www.ubs.com/global/en/quotes.html https://zkb-finance.mdgms.com/home/index.html?LANG=de https://www.snb.ch/de/mmr/reference/gwd_20170904/source/gwd_20170904.de.pdf
,
Sep 8 2017
Re-opening to see about achieving better browser compat on this question. Perhaps a web platform test should be added.
,
Sep 9 2017
This seems to be the result of a change to CLDR: http://unicode.org/cldr/trac/ticket/9865 . I'd expect it to come to Safari and Firefox as well, as they upgrade to newer ICU versions. I think CLDR is the right place to file this bug, unless there's a strong reason for a tailoring to be Google-specific.
,
Sep 15 2017
More proof that the unicode change was wrong. Regional settings in windows & mac are also using U+0027. See screenshots.
,
Sep 15 2017
Pointing to applications that does things differently is in no way "proof" that it is wrong. We follow the standard as been pointed out repeatedly in this bug. If you disagree with the change then please file a bug with CLDR. We use a newer version of ICU and CLDR than most applications and as they are updated they too will get the new behavior. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by chrishtr@chromium.org
, Sep 8 2017