golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.63k stars 17.49k forks source link

x/text/currency: supported currency codes need an update (MRO->MRU, VEF->VES) #36543

Open elideveloper opened 4 years ago

elideveloper commented 4 years ago

What version of Go are you using (go version)?

$ go version
go version go1.13.4 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

Any.

What did you do?

https://play.golang.org/p/GoUe1pIAVjo

What did you expect to see?

VES and MRU must be parsed.

What did you see instead?

currency: tag is not a recognized currency

Additional info

Since 2018 VEF->VES and MRO->MRU but currency lib supports old currency names. https://www.iso.org/iso-4217-currency-codes.html https://en.wikipedia.org/wiki/List_of_circulating_currencies

ianlancetaylor commented 4 years ago

CC @mpvl

sk- commented 5 months ago

Is there any progress about this?

The OP would be resolved if CLDR was upgraded to at least version 34.

See https://github.com/unicode-org/cldr/blob/release-34/common/supplemental/supplementalData.xml#L1111-L1115 and https://github.com/unicode-org/cldr/blob/release-34/common/supplemental/supplementalData.xml#L760-L764

However, note that there are some even newer currency changes, like the deprecation of the Croatian Kuna (HRK) and the Cuban Convertible Peso (CUC). See this article in wikipedia.

Screen Shot 2024-03-22 at 11 35 03

Upgrading CLDR may prove complicated as the parser definitions are still for version 32, and there's another outstanding issue related to the upgrade to CLDR 40.

Is there any chance that the updates to CLDR follow certain cadence, given that they are releasing every 6 months and the current version used by Go is more than 6 years old.

Screen Shot 2024-03-22 at 11 36 58
bojanz commented 5 months ago

@sk- As far as I've been told, nobody is maintaining or developing this package right now, so no update cadence can be expected.

You might find my bojanz/currency package a suitable replacement for certain use cases.