Failure to specify a locale for ``++String++`` case conversions means the system default encoding will be used, possibly creating problems with international characters. Such code may work fine in its "home" environment, but break in ways that are extremely difficult to diagnose for customers who use different encodings. Such bugs can be nearly, if not completely, impossible to reproduce when it's time to fix them.


== Noncompliant Code Example

----
String myStr = "José is a nice guy.";
String myUcString = myStr.toUpperCase(); // Noncompliant
----


== Compliant Solution

----
String myStr = "José is a nice guy.";
String myUcString = myStr.toUpperCase(Locale.US);
----



ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
