Exemplo n.º 1
0
 public static byte[] UrlEncodeUnicodeToBytes(string s)
 {
     if (s == null)
     {
         return(null);
     }
     if (s.Length == 0)
     {
         return(new byte[0]);
     }
     return(HttpUtility.UrlEncodeUnicodeToBytesInternal(s));
 }
Exemplo n.º 2
0
 public static string UrlEncodeUnicode(string s)
 {
     return((s != null && s.Length != 0) ? Encoding.ASCII.GetString(HttpUtility.UrlEncodeUnicodeToBytesInternal(s)) : s);
 }