You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Get OEM codepage from NetFX, which parses the NLP file with culture info table etc etc.
478
+
/// But sometimes it yields the special value of 1 which is nicknamed <c>CodePageNoOEM</c> in <see cref="Encoding"/> sources (might also mean <c>CP_OEMCP</c>, but Encoding puts it so).
479
+
/// This was observed on Ukranian and Hindu systems.
480
+
/// Given this value, <see cref="Encoding.GetEncoding(int)"/> throws an <see cref="ArgumentException"/>.
481
+
/// So replace it with some fallback, e.g. 437 which is the default cpcp in a console in a default Windows installation.
482
+
/// </remarks>
483
+
staticintdefaultCodePage=
484
+
Thread.CurrentThread.CurrentCulture.TextInfo.OEMCodePage!=1/* CodePageNoOEM constant, causes ArgumentException in subsequent calls to Encoding::GetEncoding() */?
485
+
Thread.CurrentThread.CurrentCulture.TextInfo.OEMCodePage:437/* The default OEM encoding in a console in a default Windows installation, as a fallback. */;
0 commit comments