Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EncodingHelper.cs
Go to the documentation of this file.
1namespace System.Text;
2
3internal static class EncodingHelper
4{
5 internal static Encoding GetSupportedConsoleEncoding(int codepage)
6 {
7 int codePage = Encoding.GetEncoding(0).CodePage;
8 if (codePage == codepage || codePage != 65001)
9 {
10 return Encoding.GetEncoding(codepage);
11 }
12 if (codepage != 65001)
13 {
14 return new OSEncoding(codepage);
15 }
16 return new UTF8Encoding(encoderShouldEmitUTF8Identifier: false);
17 }
18}
static Encoding GetSupportedConsoleEncoding(int codepage)
static Encoding GetEncoding(int codepage)
Definition Encoding.cs:593