Locales including scripts are not round-tripped properly by LocaleTypeDescriptor. An example of such a locale is “zh-Hant-HK”, which gets converted to a String as “zh_HK_#Hant” but read back as “zh- Hant HK ”.
LocaleTypeDescriptor.fromString builds the Locale instance uses the Locale constructor, which does not allow specifying a script or extension; alternatives would be to use [Locale.forLanguageTag|https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html#forLanguageTag-java.lang.String-], or [Locale.Builder|https://docs.oracle.com/javase/8/docs/api/java/util/Locale.Builder.html]. |
|