Anyone have any idea how to get the value of “Language for Non-Unicode Programs” in Control Panel Regional Settings programmatically using c#?
Already tried CultureInfo, RegionInfo and getting the default encoding using the Encoding object, but I can only get the Standards and Formats value or the main code page.
Thread.CurrentUICulture
gets that value.The NLS Terminology page in Internationalization for Windows Applications has the answer:
The
GetACP
function returns the “ANSI code page” (e.g. 1252 for english), whileGetOEMCP
returns the “OEM code page” (the code page used in the console, 437 for english).Code Pages has more information about code pages in Windows.