HttpUtility.HtmlEncode doesn't encode everything
Posted
by Anthony
on Stack Overflow
See other posts from Stack Overflow
or by Anthony
Published on 2009-02-13T20:53:59Z
Indexed on
2010/05/23
4:10 UTC
Read the original article
Hit count: 287
I am interacting with a web server using a desktop client program in C# and .Net 3.5. I am using Fiddler to see what traffic the web browser sends, and emulate that. Sadly this server is old, and is a bit confused about the notions of charsets and utf-8. Mostly it uses Latin-1.
When I enter data into the Web browser containing "special" chars, like "O p ? 8 ? ?
? ? ? ? ? ? ? ? ? ? ? ?" fiddler show me that they are being transmitted as follows from browser to server: "♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓ "
But for my client, HttpUtility.HtmlEncode does not convert these characters, it leaves them as is. What do I need to call to convert "?" to ♈ and so on?
© Stack Overflow or respective owner