Relation between .NET Encoding and Characterset

c#, character-encoding, codepages

Solution

ANSI is the current Windows ANSI code page, equivalent to Encoding.Default.

OEM is the current OEM code page typically used by console applications.

You can get this using:

Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage)

In a console application, the OEM encoding will also be available using

Console.OutputEncoding

Problem

What's relation between CharacterSet here: http://msdn.microsoft.com/en-us/library/ms709353(VS.85).aspx and ascii encoding here: http://msdn.microsoft.com/en-us/library/system.text.asciiencoding.getbytes(VS.71).aspx

Original source