If locale-based string comparison is not available, converting to UPPERCASE is better than lowercase. For example,
uppercase("Straße") == uppercase("Strasse") == "STRASSE"
lowercase("Straße") != lowercase("Strasse"), because "straße" != "strasse"
For more on the ß character, see Eszett (ß = German sharp S).
If you are making a decision based on the result of a string comparison or a case change, be sure to avoid the invariant culture. See Invariant Culture.
No comments:
Post a Comment