Controls how Unicode characters are output by the HtmlEncode methods.
Assembly: System (in System.dll)
|Use automatic behavior. The Unicode encoding behavior is determined by current application's target Framework. For .NET Framework 4.5 and later, the Unicode encoding behavior is strict.|
|Use strict behavior. Specifies that individual UTF-16 surrogate code points are combined into a single code point when one of the HtmlEncode methods is called. For example, given the input string "\uD84C\uDFB4" (or "\U000233B4"), the output of the HtmlEncode methods is "&#144308;".If the input is a malformed UTF-16 string (it contains unpaired surrogates, for example), the bad code points will be replaced with U+FFFD (Unicode replacement char) before being HTML-encoded.|
|Use compatible behavior. Specifies that individual UTF-16 surrogate code points are output as-is when one of HtmlEncode methods is called. For example, given a string "\uD84C\uDFB4" (or "\U000233B4"), the output of HtmlEncode is "\uD84C\uDFB4" (the input is not encoded).|
For more information on how Unicode characters are supposed to be encoded in HTML, see Using character escapes in markup and CSS.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.