Forum Moderators: open

Message Too Old, No Replies

URL Encoding German Chars problem. help please.

HttpUtility.UrlEncode

         

zf007

7:07 am on Oct 29, 2003 (gmt 0)

10+ Year Member



Hi All,
I'm using c# in asp.net and I tried to encode some upper part of ASCII chars, eg. á
The desired result should be: %E1
But when I use HttpUtility.UrlEncode("á"), the output result is: %c3%a1
I tried ISO 8859-1 and utf-8, neither works.
anybody can help me?
Or other way to do it, javascript escape?no experice with that
thanks for any help

Feng

Xoc

1:06 am on Nov 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's because the %c3%a1 is the unicode equivalent of the accented a. What is it that you are using on the other end that needs %E1?

zf007

5:01 am on Nov 4, 2003 (gmt 0)

10+ Year Member



sorry, I didn't see your reply in the first place.
Now I managed to get %E1 encoding by using different encoding method. The default for .NET I assume is utf-8, which encoding accent a into %c3%a1, I chaged to iso-8859-1, it works.
Thanks

Feng