You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stephen Caine <st...@commongrnd.com> on 2006/01/07 16:31:01 UTC

How to set a charset

Before I begin, I am trying to create a new topic, not hijacking an  
existing thread.

My problem is that I need for my browser to display characters using  
the UTF-8 character set.  In other words, characters such as, "é, ü"  
are displayed as garbage.

I have tried to edit the web.xml file and adding a CATALINA_OPT, both  
were unsuccessful.  I also tried to add a META tag explicitly naming  
the character set.  All attempts failed.  Can anyone offer another  
suggestion?  Here is what I tried:

(in the start up script)

CATALINA_OPTS=-Dfile.encoding=UTF-8

(in web.xml)

<context-param>								
	<param-name>contextDefaultEncoding</param-name>
	<param-value>UTF-8</param-value>
</context-param>

Thank you,

Stephen Caine
CommonGround Softworks, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to set a charset

Posted by Mauro Bertapelle <ma...@jmatica.com>.
Stephen,

assuming you are running Tomcat in a unix/linux environment, try to set 
the locale environment
in the shell script that start tomcat.

Something like this:
LC_CTYPE=en_GB.UTF-8

Mauro
--

Stephen Caine wrote:

> My problem is that I need for my browser to display characters using  
> the UTF-8 character set.  In other words, characters such as, "é, ü"  
> are displayed as garbage.



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