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