We're updating the issue view to help you get more done. 

com.ibm.icu.util.Currency.getAvailableLocales() does not return all locales

Description

I am seeing an inconsistency on what I am getting back from com.ibm.icu.util.Currency.getAvailableLocales() and java.util.Locale.getAvailableLocales(). When I call the method on the ICU Currency object, I only get back one 'zh' locale for Chinese. When I call the method from the Locale object, I get back the following locales for Chinese: zh, zh_CN, zh_CN_HK, zh_HK, zh_SG and zh_TW.

Code Fragments:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ... import java.util.Locale; import com.ibm.icu.util.Currency; ... Locale[] locales2 = Currency.getAvailableLocales(); for (Locale locale: locales2) { Log.logger.logp(Level.FINEST, "CurrencyUtils", "getCurrencyTypes","Locale = " + locale.getDisplayName() + " Language = " + locale.getLanguage() + " toString " + locale.toString()); } ... Locale[] locales3 = Locale.getAvailableLocales(); for (Locale locale: locales3) { Log.logger.logp(Level.FINEST, "CurrencyUtils", "getCurrencyTypes","Java Locale = " + locale.getDisplayName() + " Language = " + locale.getLanguage() + " toString " + locale.toString()); } ...

Result Fragments:

1 2 3 4 5 6 7 8 9 10 11 12 13 .... 2009/02/19 17:29:36.000 FINEST Locale = Chinese Language = zh toString zh ..... 2009/02/19 17:29:41.062 FINEST Java Locale = Chinese Language = zh toString zh 2009/02/19 17:29:41.062 FINEST Java Locale = Chinese (China) Language = zh toString zh_CN 2009/02/19 17:29:41.062 FINEST Java Locale = Chinese (China,HK) Language = zh toString zh_CN_HK 2009/02/19 17:29:41.062 FINEST Java Locale = Chinese (Hong Kong S.A.R.) Language = zh toString zh_HK 2009/02/19 17:29:41.062 FINEST Java Locale = Chinese (Singapore) Language = zh toString zh_SG 2009/02/19 17:29:41.062 FINEST Java Locale = Chinese (Taiwan) Language = zh toString zh_TW

Status

Assignee

TracBot

Reporter

TracBot

Labels

None

Reviewer

None

Time Needed

None

Start date

None

Components

Priority

assess