On Mar 14, 7:39*pm, "lookaround" <lookaro...@virgilio.it> wrote:
> Hi,
> * * I have a problem with UrlEncoding/UrlDecoding.
>
> I have two chars (東京);
> the HTTPUtility.UrlEncode writes in the html the text:
> %e6%9d%b1%e4%ba%ac
>
> The Request.Querystring.ToString() of the called page returns:
> %u00e6%u009d%u00b1%u00e4%u00ba%u00ac
>
> and after having UrlDecoded I obtain the text
> *æ±äº¬
>
> I don't know what's the problem... How should I do to obtain the
> original text using UrlEncode and Decode?
>
> I've posted the problem on asp.net forums too but didn't finad any
> solution...
> Thank you very much in advance for any idea!
It is symmetric.
Response.Write(
System.Web.HttpUtility.UrlDecode(
System.Web.HttpUtility.UrlEncode(
"東京")));
Output: 東京
It looks like you encode or decode the string more than one time
|