字符串utf-8相互转换

--------字符串转utf-8

UTF8Encoding utf8 = new UTF8Encoding();
byte[] encodedBytes = utf8.GetBytes(json);

----------------------utf-8转字符串

string inputString = System.Text.Encoding.UTF8.GetString(response);

posted on 2020-06-19 15:20  Smile向前  阅读(3159)  评论(0编辑  收藏  举报