You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To consistently obtain correct results when capitalizing / decapitalizing locale insensitive strings (such as programming language identifiers), Locale.ROOT must be specified as a parameter to String.toUpperCase() and String.toLowerCase(). This blog: https://mattryall.net/blog/the-infamous-turkish-locale-bug summarizes the problem with allowing the default locale to be used with String.toUpperCase() and String.toLowerCase(). Also see the note in the Javadoc here: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html#toUpperCase() which promotes the usage of Locale.ROOT for capitalizing locale independent strings. A user with a Turkish locale will see surprising and incorrect results with capitalizing the letter "i". The capitalization rules for other locales may also produce incorrect results.
The text was updated successfully, but these errors were encountered:
To consistently obtain correct results when capitalizing / decapitalizing locale insensitive strings (such as programming language identifiers),
Locale.ROOT
must be specified as a parameter toString.toUpperCase()
andString.toLowerCase()
. This blog: https://mattryall.net/blog/the-infamous-turkish-locale-bug summarizes the problem with allowing the default locale to be used withString.toUpperCase()
andString.toLowerCase()
. Also see the note in the Javadoc here: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html#toUpperCase() which promotes the usage ofLocale.ROOT
for capitalizing locale independent strings. A user with a Turkish locale will see surprising and incorrect results with capitalizing the letter "i". The capitalization rules for other locales may also produce incorrect results.The text was updated successfully, but these errors were encountered: