private string escape(string s) { StringBuilder sb = new StringBuilder(); byte[] ba = System.Text.Encoding.Unicode.GetBytes(s); for (int i = 0; i < ba.Length; i += 2) { /**///// BE SURE 2's sb.Append("%u"); sb.Append(ba[i + 1].ToString("X2")); sb.Append(ba[i].ToString("X2")); } return sb.ToString(); } |
|