WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
214546
Intl NumberFormat style currency incorrect format for 'es-CA' CAD
https://bugs.webkit.org/show_bug.cgi?id=214546
Summary
Intl NumberFormat style currency incorrect format for 'es-CA' CAD
Illia Bilichenko
Reported
2020-07-20 02:16:03 PDT
Facing different results of currency format for locale 'es-CA' and CAD currency. In Chrome(84.0.4147.89) and Firefox(78.0.2): Intl.NumberFormat("es-CA", { style: 'currency', currency: "CAD" }).format(100.0) --> "100,00 CA$" In Safari(14.0) & Webkit build(
r264591
): Intl.NumberFormat("es-CA", { style: 'currency', currency: "CAD" }).format(100.0) --> "$110.00" Unfortunately, I can't find any specification how it showed be formated. Is it expected behavior?
Attachments
Intl.NumberFormat problem
(53.43 MB, video/mp4)
2020-07-27 05:44 PDT
,
Dmitry Boksha
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-07-27 02:16:15 PDT
<
rdar://problem/66152350
>
Dmitry Boksha
Comment 2
2020-07-27 05:41:25 PDT
I have a similar situation with Intl.NumberFormat('fr-US', { style: 'currency', currency: 'USD' }).format(99999999) Chrome (84.0.4147.89) and Firefox (78.0.2) --> "99 999 999,00 $US" Safari (Version 13.1.2 (15609.3.5.1.3) --> "99999999,00 $US"
Dmitry Boksha
Comment 3
2020-07-27 05:44:10 PDT
Created
attachment 405267
[details]
Intl.NumberFormat problem But something interesting happens when I'm trying to select or copy/paste value.
Yusuke Suzuki
Comment 4
2020-07-29 11:51:34 PDT
Thanks for your reporting! (In reply to Illia Bilichenko from
comment #0
)
> Facing different results of currency format for locale 'es-CA' and CAD > currency. > > In Chrome(84.0.4147.89) and Firefox(78.0.2): > Intl.NumberFormat("es-CA", { style: 'currency', currency: "CAD" > }).format(100.0) --> "100,00 CA$" > > In Safari(14.0) & Webkit build(
r264591
): > Intl.NumberFormat("es-CA", { style: 'currency', currency: "CAD" > }).format(100.0) --> "$110.00" > > Unfortunately, I can't find any specification how it showed be formated. Is > it expected behavior?
Yes, both are right and expected behaviors because CAD's code is $. (In reply to Dmitry Boksha from
comment #3
)
> Created
attachment 405267
[details]
> Intl.NumberFormat problem > > But something interesting happens when I'm trying to select or copy/paste > value.
Strictly speaking, this is not WebKit's issue. They are bugs in ICU (
https://github.com/unicode-org/icu
). Firefox and Chrome are bundling the latest ICU. Safari is using ICU which is installed in the system (macOS etc.). If you upgrade the system, you will see the updated behavior in Safari. I've tested these things with ToT JavaScriptCore with Big Sur beta 3 and ensured that they are now fixed because ICU is updated by the system update.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug