C#乱码问题——转为UTF-8

string myString = Marshal.PtrToStringAnsi(ocrStr);

#region 转换为utf-8编码
byte[] bytes = Encoding.Default.GetBytes(myString);
string myStringr = Encoding.UTF8.GetString(bytes);
#endregion

相关文章