Bug 218139

Summary: Intl.NumberFormat formats ar-AE numbers differently from other browsers
Product: WebKit Reporter: Rob Snow <rsnow>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Normal CC: ap, mmaxfield, smoley, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Unspecified   
OS: Unspecified   

Description Rob Snow 2020-10-23 15:01:31 PDT
What steps will reproduce the problem?
(1) Open console
(2) Run `new Intl.NumberFormat("ar-AE", {useGrouping: false}).format(9876543210)`

What is the expected result?
"٩٨٧٦٥٤٣٢١٠"

What happens instead?
"9876543210"

See https://github.com/unicode-org/cldr/blob/master/common/main/ar_AE.xml#L42
Comment 1 Alexey Proskuryakov 2020-10-24 12:13:49 PDT
This is an intentional choice in Apple's ICU (for Apple employees, see rdar://problem/45142422&21778421).

Rob, are you reporting this as simply a mismatch with CLDR, or does this cause issues?
Comment 2 Rob Snow 2020-10-26 11:06:02 PDT
Can you explain more of why this is an intentional choice? (for us non-Apple folk)
We are relying on CLDR to handle number formatting and it's appearing differently between the browsers. This is problematic because I need to parse numbers as well, for which I also rely on CLDR because the Intl object doesn't have a corresponding number parser. I'd prefer to not have Safari specific code to override this. It certainly causes a loss of faith as well because I don't know how many more of these intentional differences exist. It also means it's harder for me to write unit tests for because Node uses CLDR as well.
Comment 3 Yusuke Suzuki 2021-07-09 01:13:31 PDT
Anyway, Intl feature is not ensuring the underlying data, and it depends on the implementation.
Please report the feedback against Apple radar since this is the intension in AppleICU, not WebKit ;)
Comment 4 Radar WebKit Bug Importer 2021-07-09 01:22:23 PDT
<rdar://problem/80365345>
Comment 5 Yusuke Suzuki 2022-02-03 20:39:59 PST
It is now upstreamed to CLDR :)
https://github.com/unicode-org/cldr/commit/c601fc4fd1321f6af4a5f9ae67f4f198305e5c63
Comment 6 Myles C. Maxfield 2022-02-03 21:20:44 PST
is "WONTFIX" really the right resolution? If the bug report is "Intl.NumberFormat formats ar-AE numbers differently from other browsers" then a legit solution is "make the other browsers match WebKit."

Seems like MOVED would be a better resolution.
Comment 7 Yusuke Suzuki 2022-02-03 21:38:35 PST
Sounds good. Changed it to MOVED.