/* * //ENCODINGFALLBACK * internal static Encoding CreateDefaultEncoding(EncodingFallback encodingFallback) { * Encoding enc; * int codePage = Win32Native.GetACP(); * * // For US English, we can save some startup working set by not calling * // GetEncoding(int codePage) since JITting GetEncoding will force us to load * // all the Encoding classes for ASCII, UTF7 & UTF8, & UnicodeEncoding. * if (codePage == 1252) { * enc = new CodePageEncoding(codePage, encodingFallback); * } * else * enc = GetEncoding(codePage); * return (enc); * } */ internal static Encoding CreateDefaultEncoding() { Encoding enc; int codePage = Win32Native.GetACP(); // For US English, we can save some startup working set by not calling // GetEncoding(int codePage) since JITting GetEncoding will force us to load // all the Encoding classes for ASCII, UTF7 & UTF8, & UnicodeEncoding. if (codePage == 1252) { enc = new CodePageEncoding(codePage); } else { enc = GetEncoding(codePage); } return(enc); }