private string Gbk2Utf8(string input) { if (string.IsNullOrEmpty(input)) { return ""; } Encoding encoding = System.Text.Encoding.GetEncoding("GB2312"); byte[] bytes = encoding.GetBytes(input); encoding = System.Text.Encoding.UTF8; string newOldHtml = encoding.GetString(bytes); return newOldHtml; }
[C#] GBK转UTF-8 编码
时间: 2024-10-19 01:35:32