W3C home > Mailing lists > Public > www-international@w3.org > July to September 2004

Re: JSP page directive contentType overriden by Apache tomcat?

From: by way of Martin Duerst <jshin@mailaps.org>
Date: Sun, 18 Jul 2004 16:03:13 +0900
Message-Id: <>
To: www-international@w3.org

KUROSAKA Teruhiko wrote:

>I see, so it's setLocale() that implicitly sets charset.
>That reminded me of my surprise when I read the servlet 2.3
>spec draft for the first time two years ago.  I wasn't
>comfortable with the idea of using  the locale to determine
>the charset.  I voiced this opinion to the spec lead
>but it was too late.

When I read Paul's and Addison's replies about setLocale() setting the 
character encoding, I thought exactly the same way as you. The relation 
between locales and character encodings are never 1:1. As such, IMHO, it's 
a (classic) bad design (unfortunately, still widespread. Hotmail, Yahoo 
mail and other web mail services are prime example of this.) to pretend 
that it is and to tie a locale to a particular character encoding. 
Especially considering that what JSP _usually_ emits (html, xml)  can 
represent the full repertoire of Unicode character set (I have NCRs in 
mind), I'm surprised to find that setLocale() sets the character encoding. 
Anyway,  making 'contentType' page directive take the precedence over 
setLocale() when it comes to setting the character encoding mostly solved 
the issue in the servlet 2.4.

Received on Sunday, 18 July 2004 03:03:15 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 21 September 2016 22:37:24 UTC