区域设置 - 如何获得区分大小写的值?

时间:2014-01-07 11:11:19

标签: java locale canonicalization

我有这样的代码:

import java.util.Locale;
Locale locale = new Locale("en_US");

当我写道:

System.out.println(locale.toString());

它返回

en_us

en_US

是否可以获得区分大小写的值?

1 个答案:

答案 0 :(得分:2)

取自OracleThe language field is case insensitive, but Locale always canonicalizes to lower case.