R
Ricky K. Rasmussen
Hello NG,
I'm having some encoding trouble using my own RequestHandler:
Since the RequestHandler must be able to serve content with diffrent
encoding, I set the Response.Charset and Response.ContentEncoding to the
encoding of current content. Furthermore I set the Content-Type META tag of
the html page to use the same charset as well.
And this all works fine... I get my pages served and both the HTTP headers
and the HTML page has the right encoding applied... Yieppie!!!
But then... when I try to submit a FORM on one of my pages, all my special
characters (like "ãøåöäé") gets lost in the process.
The only way I can preserve the special characters, is by setting the
requestEncoding attribute (specified in <globalization> in web.config) to
the same encoding as I the current Response.ContentEncoding. And that is a
bad solution since all of my requests could be in different encodings.
It doesn't work if i try to set the Response.ContentEncoding to the same as
the Request.ContentEncoding. It's as if the Request already has been decoded
using the wrong format (specified in <globalization> in web.config).
Can anyone please help? I'm I on the wrong track? Is it impossible to serve
diffrent request/response encodings through the same web site? Or am I just
doing it the wrong way?
Thanks for your time,
Ricky
I'm having some encoding trouble using my own RequestHandler:
Since the RequestHandler must be able to serve content with diffrent
encoding, I set the Response.Charset and Response.ContentEncoding to the
encoding of current content. Furthermore I set the Content-Type META tag of
the html page to use the same charset as well.
And this all works fine... I get my pages served and both the HTTP headers
and the HTML page has the right encoding applied... Yieppie!!!
But then... when I try to submit a FORM on one of my pages, all my special
characters (like "ãøåöäé") gets lost in the process.
The only way I can preserve the special characters, is by setting the
requestEncoding attribute (specified in <globalization> in web.config) to
the same encoding as I the current Response.ContentEncoding. And that is a
bad solution since all of my requests could be in different encodings.
It doesn't work if i try to set the Response.ContentEncoding to the same as
the Request.ContentEncoding. It's as if the Request already has been decoded
using the wrong format (specified in <globalization> in web.config).
Can anyone please help? I'm I on the wrong track? Is it impossible to serve
diffrent request/response encodings through the same web site? Or am I just
doing it the wrong way?
Thanks for your time,
Ricky