New issue
Advanced search Search tips

Issue 900232 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 863749
Owner:
Closed: Nov 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



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:
 
Labels: Needs-Triage-M70
Components: -Blink Blink>JavaScript>Internationalization
Owner: ftang@chromium.org
Frank, can you ptal?
on it

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 ?


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"

Cc: js...@chromium.org gsat...@chromium.org
jshin- I cannot tell do we trim out the data in chrome version of icu or not.
Status: Assigned (was: Unconfirmed)
Cc: -js...@chromium.org ftang@chromium.org
Owner: js...@chromium.org
jshin in private message "Likely to be a data issue even though the data trimming script seems fine for that."

Reassign to jshin
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. 
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 ?
Mergedinto: 863749
Status: Duplicate (was: Assigned)
curr/es_CO.res is not included in icudt*.dat. 

Labels: -Needs-Triage-M70

Sign in to add a comment