tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre John Mas <>
Subject Re: UTF-8 end to end - what am I doing wrong?
Date Thu, 10 Apr 2003 18:08:57 GMT
I tried using the filter but it doesn't seem to work any better.
The filter is basically doing:


on the request. This is something that I already tried, putting "UTF-8" 
as the value. When I go to get the inputstream and create an
InputStreamReader instance to read from the InputStream the method
InputStreamReader.getEncoding() gives me 'Cp1252' despite the heading
having the content type set to 'text/xml; charset=UTF-8'.

The test characters I have are (you should be seeing three
accented characters, followed by six chinese idiograms) :

   éüâ 佛 作 佝 佞 佟 你

When I view them written to a UTF-8 file I see:

   éüâ ? ? ? ? ? ?

Now if I explicitly set the InputStreamReader encoding to UTF-8, via
the constructor, I get:

   ��� ? ? ? ? ? ?

even though the getEncoding method returns UTF8. Its almost as if the 
characters are lost before I even get to read them from the input


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message