----- Original Message ----- From: "Johnny Kewl" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Wednesday, June 18, 2008 6:26 PM
Subject: Re: Character encoding



----- Original Message ----- From: "nch" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Wednesday, June 18, 2008 5:09 PM
Subject: Re: Character encoding


There it goes.
I have a form that has an input field named "query". I type "piraña" an submit the form using the GET method. I can see the browser has encoded this parameter into the URI as query=pira%C3%B1a I set a breakpoint into the filter so when the request hits the filter I can see getCharacterEncoding() returns null. The filters sets it to "UTF-8". Then the request gets to the controller where I can see the request parameter "query" is set to "piraña". The controller tries to perform a text search using that query but, obviously, it doesn't return any results. I can manually modify it while debugging and set it to "piraña", so the controller returns several results.
BTW. I'm running Tomcat 6.0.13 on Sun JDK 1.6.0_06

Kind regards.

nch, I think the HTML page doesnt know its charset... it doesnt look like its encoded.
Have a look at this article... they doing almost what you doing
http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/

I think you are in your software bringing the req back UTF8 encoded.... but the page that went out to the browser is not telling the browser the form must come back encoded. It looks just like normal URL encoding.... there is not UTF8 in there... I think.

nch I checked it... I was wrong, the browser is returning the right things... that is UTF8 but that display of piraña is still ISO... ie ISO trying to display the UTF8
So its been read wrong in the server.. sorry.
If the IDE is not set up for UTF8... then the display is right, NB just cant show it to you until it can also read UTF8... good luck ;) Maybe its just your eyes that are broken, and TC is working ;) Send it back to a the browser... it will probably be right... in which case its the IDE ;)

Good luck ;)

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

Reply via email to