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 ‘Ω π ℵ ∞ ♣ ♥ ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓’ 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?
It seems horribly inefficient, but the only way I can think to do that is to look through each character: