A locale is a set of regional and linguistic conventions. In Java, the default JVM locale can silently affect operations such as case conversion and number formatting. section 6.11 section 6.2
The Turkish-locale case-conversion mistake
String type = "point"; boolean isPoint = type.toUpperCase().equals("POINT"); This can fail under the Turkish locale because Turkish maps lowercase i to uppercase İ, not I. The same problem can affect normalized XML tags, YAML keys, and internal identifiers. section 6.2
No-argument toUpperCase() and toLowerCase() use the default locale, which comes from user preferences, environment variables, or JVM properties. Case conversion can also change string length: Straße becomes STRASSE under Locale.GERMAN. section 6.2
Avoid locale-sensitive surprises by:
- Passing an explicit locale when converting case for machine-oriented identifiers. section 6.2
- Testing with Turkish and other relevant locales instead of assuming English behavior. section 6.2
- Avoiding assumptions that converted text retains its original length. section 6.2



