ModernUO/Projects/Server.Tests/Helpers/EncodingHelpers.cs
Kamron Batman ae436cb55f
Fix bad serials (#304)
- [X] Fixes bad serial calculations
- [X] Tightens HexStrings

Bumps release version
Updates documentation
2020-11-08 12:09:26 -08:00

16 lines
404 B
C#

using System.Text;
namespace Server.Tests
{
public static class EncodingHelpers
{
public static Encoding GetEncoding(string bodyname) =>
bodyname switch
{
"utf-8" => Utility.UTF8,
"utf-16" => Utility.UnicodeLE,
"utf-16BE" => Utility.Unicode,
_ => Encoding.ASCII
};
}
}