i need to pass special characters trough the webservice. i used the code
HttpUtility.UrlEncode("french character")
but the encoding is not working correctly if the string contains a double Quots
eg: HttpUtility.UrlEncode("é")
it encodes fine. but not decodes properly
......Thank in advance ......
Url encoding of the french character é
is %E9
when we use
HttpUtility.UrlEncode("é")
we get the output as %c3%a.
HttpUtility.UrlEncode("é", System.Text.Encoding.GetEncoding("ISO-8859-1")
gives the correct encoded output ie %E9
I don't see what your problem is. This code:
Console.WriteLine(System.Web.HttpUtility.UrlEncode("something enclosed \"in quotes\""));
outputs this result:
something+enclosed+%22in+quotes%22
just as it should, without the \
character. So what's the problem, exactly?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With