Controls how Unicode characters are interpreted by the HtmlDecode methods.
Assembly: System (in System.dll)
|Use automatic behavior. The decoding behavior is determined by current application's target Framework. For .NET Framework 4.5 and later, the Unicode encoding decoding is strict.|
|Use strict behavior. Specifies that the incoming encoded data is checked for validity before being decoded. For example, an input string of "&#144308;" would decode as U+233B4, but an input string of "&#xD84C;&#xDFB4;" would fail to decode properly. Already-decoded data in the string is not checked for validity. For example, an input string of "\ud800" will result in an output string of "\ud800", as thealready-decoded surrogate is skipped during decoding, even though it is unpaired.|
|Use compatible behavior. Specifies that incoming data is not checked for validity before being decoded. For example, an input string of "&#xD84C;" would decode as U+D84C, which is an unpaired surrogate. Additionally, the decoder does not understand code pointsin the SMP unless they're represented as HTML-encoded surrogates, so the inputstring "&#144308;" would result in the output string "&#144308;".|
|Use loose behavior. Similar to in that there are no validity checks, but the decoder alsounderstands code points. The input string "&#144308;" would decode into the character U+233B4 correctly. This switch is meant to provide maximum interoperability when the decoder doesn't know which format the provider is using to generate the encoded string.|
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.