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.CurrentUICulturegets that value.The NLS Terminology page in Internationalization for Windows Applications has the answer:
The
GetACPfunction returns the “ANSI code page” (e.g. 1252 for english), whileGetOEMCPreturns the “OEM code page” (the code page used in the console, 437 for english).Code Pages has more information about code pages in Windows.