标签:closed pen ret 获取 tco 技术 分享图片 分享 public
/// <summary> /// 获取转UTF8的字符串 /// </summary> /// <param name="strWord"></param> /// <returns></returns> public static string GetUtf8String(string strWord) { string strRes = string.Empty; if (string.IsNullOrEmpty(strWord)) { return strRes; } string s = BitConverter.ToString(System.Text.Encoding.UTF8.GetBytes(strWord)); foreach (byte b in Encoding.UTF8.GetBytes(s)) { strRes += ‘%‘ + b.ToString("X"); } return strRes; }
标签:closed pen ret 获取 tco 技术 分享图片 分享 public
原文地址:http://www.cnblogs.com/maojunyi/p/7856847.html