tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: Migrating to tomcat 6 gives formatted currency amounts problem
Date Fri, 12 Sep 2008 19:26:07 GMT

Nope - most editors do not let you choose the character encoding, they just 
use the platform default.  Some do let you choose a UTF-x flavor in lieu of 
the platform default, which is quite desirable.  Some fonts (e.g., 
Wingdings) redefine the glyphs for given code points in order to display 
oddball symbols within a non-Unicode encoding; these were pretty much all 
developed before Unicode came into widespread use, but are still around for 
compatibility.

You know your stuff Chuck ;)

Wonder if Wil knew he asked such a damn big question... ha ha

Ok... some more homework on this thing...

Servlet Response does in fact have a setLocale(Locale loc) function...
Which seems to indicate that if headers or something like
response.setContentType("text/html;charset=UTF-8");
is *not* used... TC will take on the encoding(ha ha did it again) charset of 
that locale...

I find thinking outside of HTTP headers difficult... and it seems that 
servlet spec has recognized the conflict inherent in locale and http header.
It seems that prior to Servlet spec 2.4 if a coder used locale dependent 
JSTL to access resource bundles... that would in fact override
setContentType.... this apparently is no longer the case... the header takes 
pref...

So André thats what you could well be seeing in your application.... because 
the charset would follow the locale and that would be whatever
the JRE wants to give you...

ie the coder didnt even have to explicitly use a locale function a JSTL call 
using a resource bundle will do it...

Its seems they are trying to bring locale technology that one applies in 
Swing without too much thought and web technology a little closer...
Still lots of places to get caught it seems...
I think you just got to put on a different hat when doing Swing and Web 
internationalization... different animals, with just enough commonality to 
cause pain ;)

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------








---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message