Re: Special Characters in Query String



Joerg Jooss wrote:

strQuery = HttpUtility.UrlEncode(strQuery,
System.Text.Encoding.Default)

I suggest using a more web-friendly encoding than some Windows specific default, e.g. ISO-8859-1 or UTF-8.

Obviously UTF-8 is to be preferred and in most cases this is the actual default value returned by System.Text.Encoding.Default.


Still, in my experience, one needs to use the default rather than explicitly choosing UTF-8 if the application is to run on _any_ webhotel without encountering encoding mismatch problems, at least with querystrings.

Kim :o)
.


Loading