Assembly: mscorlib (in mscorlib.dll)
To get the encoding associated with the default ANSI code page in the system's regional settings, use GetEncoding(0) or the Default property. To determine the default code pages used on the system, use the Windows API GetSystemDefaultLangID. To determine the current ANSI code page, use the Windows API GetACP.
Different systems might use different encodings as the default; therefore, data streamed from one system to another might be translated incorrectly. To ensure that the encoded bytes are decoded properly, use a Unicode encoding (that is, UTF8Encoding, UnicodeEncoding, or UTF32Encoding) with a preamble. Another option is to use a higher level protocol to ensure that the same format is used for encoding and decoding.
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.