RE: JSP page directive contentType overriden by Apache tomcat?

On Sat, 17 Jul 2004, Addison Phillips [wM] wrote:

> > KUROSAKA Teruhiko wrote:
> >
> > If it's just that charset declaration is wrong but the parameters
> > are encoded in UTF-8, then a quick fix would be to add
> > META header in each JSP:
> >     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

> The META tag doesn't help anything if the actual encoding of the
> output is Latin-1. In fact, the META tag is just some text in the page
> (to the JSP processor): it can say anything you want and it is nice to
> have, but it doesn't matter. What matters is the actual conversion of
> the page from java.lang.String to bytes.

Absolutely. In Nutch's case, however, this could have worked if incorrect
'C-T' header were not emitted via HTTP (which is not the case so that just
adding meta tag would never work) because Nutch's jsp emits everything
in entity names (that is, everything is in ASCII range.  Needless to
say, this is  inefficient and has to be changed). The reason I want
to make it emit the correct 'C-T' header is to get 'form submission'
code on the client-side(browsers)  to work with any Unicode character
by making browsers recognize that the page is in UTF-8.

Jungshik

Received on Saturday, 17 July 2004 13:05:18 UTC