You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Benson Margulies <be...@basistech.com> on 2000/01/27 14:05:12 UTC

HTTP charset headers and Tomcat

Dear Jakarta,

I believe that I have encountered a bug or missing feature in the production
of HTTP charset headers in the current Tomcat windows binary. I am prepared
to join the development effort to do something about it, but I thought it
would be polite to start by asking if it was a well-known phenomenon of some
sort.

If I call setContentType("text/html;charset=UTF8")

and use the printWriter, the resulting stream of data sure is in UTF8.
Unfortunately, the HTTP header does not seem to be advertising it as such.
In order to get the browser to recognize that the page is UTF-8, I have to
include a META tag (or, in some cases, I can fool it by including a UTF-8
BOM at the top of the file.)

This does not seem right to me. I've seen identical behavior from JWS 2.0.

Is this by purpose or on accident? If this is an opportunity to roll up
sleeves and contribute labor, I'm prepared to do so.

Thanks in advance for your consideration,

Benson Margulies
http://www.basistech.com