Encoding.GetEncodings Method ()
Returns an array that contains all encodings.
Assembly: mscorlib (in mscorlib.dll)
This method returns a list of supported encodings, uniquely distinguished by code page. For a table that lists the supported encodings, see the Encoding class topic.
Encodings 50220 and 50222 are both associated with the name "iso-2022-jp", but they are not identical. Encoding 50220 converts half-width Katakana characters to full-width Katakana characters, whereas encoding 50222 uses a shift-in/shift-out sequence to encode half-width Katakana characters. The display name for encoding 50222 is "Japanese (JIS-Allow 1 byte Kana - SO/SI)" to distinguish it from encoding 50220, which has the display name "Japanese (JIS)".
If you request the encoding name "iso-2022-jp", the .NET Framework returns encoding 50220. However, the encoding that is appropriate for your app depends on the preferred treatment of the half-width Katakana characters.
To get a specific encoding, you should use the GetEncoding method.
is sometimes used to present the user with a list of encodings in a File Save as dialog box. However, many non-Unicode encodings are either incomplete and translate many characters to "?", or have subtly different behavior on different platforms. Consider using UTF-8 or UTF-16 as the default.
Available since 2.0