tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject Re: TC3.3: Encoding
Date Tue, 20 Feb 2001 19:23:00 GMT

> Perhaps there are two i18n improvements in Servlet 2.3 and JSP 1.2:
> 
> 1, javax.servlet.ServletRequest#setCharacterEncoding()
> 2, pageEncoding attribute of Page directive
> 
> Alternative workarounds in these two points makes non-ASCII users
> happy.

What I'm saying is that instead of implementing any workaround I'll
just 
try to make sure we implement the standard ( ;charset= ) and make it
possible to customize this ( by adding a module ). 

The problem is not in the servlet spec - 2.3 does allow you to specify
the encoding before getting the parameters, but that doesn't help if
you don't know the encoding. 

I spent a lot of time on this issue, and the real problem is that a
browser can send data in any charset - and nobody can know which
charset is used ( neither tomcat nor a servlet using 2.3
setCharacterEncoding),
so the servlet API version is not the very important ( except that in
2.3 you have an extra workaround you can play - assuming you know how
to find the encoding ).  

It seems there are a number of guesses and heuristics someone can use,
and in future UTF8 will work in most cases ( except that right now we 
are required to default to 8859-1, not UTF8 ). But I wouldn't include
any of them in the tomcat3.3 release - instead I'll make sure you can
control this with a module. 

Costin




__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Mime
View raw message