New issue
Advanced search Search tips

Issue 763268 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

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&section=12#Examples_of_use
 
Components: Blink>JavaScript>Internationalization
Cc: e...@chromium.org
I think the reported value is actually correct, though another person who
is more expert will reply shortly.
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

Comment 4 by e...@chromium.org, 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.

Comment 5 by e...@chromium.org, Sep 8 2017

https://en.wikipedia.org/wiki/Decimal_mark has more on this.

Status: WontFix (was: Unconfirmed)
Status: Available (was: WontFix)
Re-opening to see about achieving better browser compat on this question.

Perhaps a web platform test should be added.
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.
More proof that the unicode change was wrong.
Regional settings in windows & mac are also using U+0027. See screenshots.
mac_regional.png
271 KB View Download
windows_regional.png
69.2 KB View Download

Comment 11 by e...@chromium.org, Sep 15 2017

Status: WontFix (was: Available)
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