C# 编码转换 utf8转gbk gbk转utf8 byte[]转string string转byte[]
utf8转gbk
public string 编码_utf8到gbk(string 要转化的文本) { var buffer = Encoding.UTF8.GetBytes(要转化的文本); buffer = Encoding.Convert(Encoding.UTF8, Encoding.GetEncoding("GBK"), buffer);/ return Encoding.GetEncoding("GBK").GetString(buffer); }
gbk转utf8