Issue metadata
Sign in to add a comment
|
Chrome implementation about ECMAScript Intl.NumberFormat function for the Colombia currency Symbol is incorrect
Reported by
glaydson...@ifood.com.br,
Oct 30
|
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.54 Safari/537.36
Steps to reproduce the problem:
Execute in differents browsers:
new Intl.NumberFormat('es-CO', { style: 'currency', currency: 'COP' }).format(64679)
1. Chrome's return: "COP 64.679"
2. Firefox's return: "$ 64.679,00"
3. MS Edge's return: "$ 64.679,00"
What is the expected behavior?
What went wrong?
The currency symbol for Colombia is $, not COP.
ISO pattern: ISO 4217
https://en.wikipedia.org/wiki/Colombian_peso
Did this work before? No
Chrome version: 70.0.3538.54 Channel: beta
OS Version:
Flash Version:
,
Nov 1
,
Nov 2
Frank, can you ptal?
,
Nov 2
on it
,
Nov 2
jshin - this is what i got
d8> new Intl.NumberFormat('es-CO', { style: 'currency', currency: 'COP' }).format(64679)
"COP 64.679,00"
d8> new Intl.NumberFormat('es-CO', { style: 'currency', currency: 'COP', currencyDisplay: 'symbol'}).format(64679)
"COP 64.679,00"
d8> new Intl.NumberFormat('es-CO', { style: 'currency', currency: 'COP', currencyDisplay: 'code'}).format(64679)
"COP 64.679,00"
d8> new Intl.NumberFormat('es-CO', { style: 'currency', currency: 'COP', currencyDisplay: 'name'}).format(64679)
"64.679,00 pesos colombianos"
I suspect this is due to the https://cs.chromium.org/chromium/src/third_party/icu/scripts/trim_data.sh
But how can I see the trimmed version which build into
https://cs.chromium.org/chromium/src/third_party/icu/common/icudtb.dat ?
,
Nov 2
d8> new Intl.NumberFormat('en', { style: 'currency', currency: 'USD'}).format(64679)
"$64,679.00"
d8> new Intl.NumberFormat('en', { style: 'currency', currency: 'USD', currencyDisplay: 'code'}).format(64679)
"USD 64,679.00"
d8> new Intl.NumberFormat('en', { style: 'currency', currency: 'USD', currencyDisplay: 'name'}).format(64679)
"64,679.00 US dollars"
d8> new Intl.NumberFormat('en', { style: 'currency', currency: 'USD', currencyDisplay: 'symbol'}).format(64679)
"$64,679.00"
,
Nov 5
jshin- I cannot tell do we trim out the data in chrome version of icu or not.
,
Nov 5
,
Nov 6
jshin in private message "Likely to be a data issue even though the data trimming script seems fine for that." Reassign to jshin
,
Nov 6
It turned out that the data trimming does not touch es-CO or es-CL currency formatting entries.
And another currency customized in es-CO and es-CL (USD) is formatted as expected.
es_CO{
%%Parent{"es_419"}
Currencies{
COP{
"$",
"peso colombiano",
}
USD{
"US$",
"dólar estadounidense",
}
}
Version{"2.1.43.65"}
}
Will take another look later.
,
Nov 6
Jshin- could we change our data trimming script in a way that in the future we also check in the trimmed .txt file into the tree so we can easily search and find out what the data looks like after the trimming ?
,
Nov 11
,
Nov 18
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by krajshree@chromium.org
, Oct 30