IG: add problem examples to the description

This commit is contained in:
Bas Leijdekkers
2019-03-08 11:32:42 +01:00
parent 76a5cabcf7
commit 5abf8a14a2
@@ -3,7 +3,12 @@
Reports any call of <b>toUpperCase()</b> or
<b>toLowerCase()</b> on <b>String</b> objects which
do not specify a <b>java.util.Locale</b>.
Such calls are usually incorrect in an internationalized environment.
In these cases the default locale of the system is used, which can cause problems in an internationalized environment.
<p>
For example the code <b>"i".toUpperCase().equals("I")</b> returns <b>false</b> in the Turkish and Azerbaijani locales,
where the dotted and dotless 'i' are separate letters.
Calling <b>toUpperCase()</b> on an English string containing an 'i', when running on a Turkish system, will return incorrect results.
Alternatively when dealing with strings that should be treated locale independently, like HTML tags, this can lead to errors.
<!-- tooltip end -->
<p>