static void Execute(stSetServerLangLogonUserCmd cmd) { GameRegion = cmd.gameRegion; var lang = MyConvert.ToString(cmd.lang).ToLowerInvariant(); CmdEncoding = (lang.Contains("utf8") || lang.Contains("utf-8")) ? new UTF8Encoding(false) : Encoding.GetEncoding("GBK"); }
static void Execute(stSetServerLangLogonUserCmd cmd) { GameRegion = cmd.gameRegion; var lang = MyConvert.ToString(cmd.lang).ToLowerInvariant(); CmdEncoding = (lang.Contains("utf8") || lang.Contains("utf-8")) ? new UTF8Encoding(false) : Encoding.GetEncoding("GBK"); }