tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From albrecht andrzejewski <albrecht.andrzejew...@ema.fr>
Subject Tomcat default encoding character ? Dfile.encoding option mean ?
Date Tue, 07 Oct 2008 20:26:20 GMT
I ran accros the ml archives, and i find some useful posts.

I've almost solved my problem: i can now display the accent (é è à)  
using   request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");

It seems that the default charset for tomcat is ISO 8859 1
The j2ee javadoc says:

"If no charset is specified, ISO-8859-1 will be used."

I was pretty sure that tomcat handles UTF-8 by default, but it's not  
the case...at least for HttpServletResponse objects. Anyway, do you  
know if it's possible to set up a default charset for the wjole tomcat  
response, instead of calling these two methods every time a request  
reach the servlet... ?

I tried to define the CATALINA_OPTS, but perhaps the file encoding is  
different from the request/response encoding.
CATALINA_OPTS="-Dfile.encoding=UTF-8"
export LC_ALL CATALINA_OPTS

-- 
Albrecht ANDRZEJEWSKI
Créateur - Incubateur Technologique
SITE-EERIE - Parc scientifique G. Besse
***
http://haveacafe.wordpress.com/

----------------------------------------------------
Ce message a ete envoye par le serveur IMP de l'EMA.



---------------------------------------------------------------------
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