We recommend using Visual Studio 2017

CA1308: Normalize strings to uppercase


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CA1308: Normalize strings to uppercase.

|Breaking Change|Non-breaking|

An operation normalizes a string to lowercase.

Strings should be normalized to uppercase. A small group of characters, when they are converted to lowercase, cannot make a round trip. To make a round trip means to convert the characters from one locale to another locale that represents character data differently, and then to accurately retrieve the original characters from the converted characters.

Change operations that convert strings to lowercase so that the strings are converted to uppercase instead. For example, change String.ToLower(CultureInfo.InvariantCulture) to String.ToUpper(CultureInfo.InvariantCulture).

It is safe to suppress a warning message when you are not making security decision based on the result (for example, when you are displaying it in the UI).

Globalization Warnings