Tomcat encoding Issue [message #26323] |
Sun, 20 May 2007 11:02  |
Eclipse User |
|
|
|
Hi all, I've had another problem with character encoding, It's my
nightmare ;-)
In Tomcat, my application wasn't able to decode special characters
correctly, I can see them without problems in texts loaded from database
or in Strings hardcoded in .class, but all user inputs were bad decoded.
I tested it in Windows, MacOS and Linux with the same effect, all tomcat
distros had factory defaults, well I found the cause (now I'm happy
;-)), in server.xml in HTTP Connector there is an attribute
"URIEncoding" that doesn't appear in default server.xml file, if this
attribute isn't setted then Tomcat assume by default ISO-8859-1, and as
you know RAP works with UTF-8 pages, so when RAP try to get a
request.getParameter(...) the result it isn't correctly processed.
I have to do more test, but now all seems to be OK.
Possibly RAP could include info about this Issue in deployment tutorial
or wiki, I think that is something to take in account. I was getting mad
until I see it.
I hope this info can help other in future.
Regards.
Roberto.
|
|
|
Re: Tomcat encoding Issue [message #26400 is a reply to message #26323] |
Sun, 20 May 2007 12:11   |
Eclipse User |
|
|
|
Link to Tomcat reference:
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
Search "URLEncoding" in page and You can see what I was speaking about.
Regards.
Roberto Sánchez escribió:
> Hi all, I've had another problem with character encoding, It's my
> nightmare ;-)
>
> In Tomcat, my application wasn't able to decode special characters
> correctly, I can see them without problems in texts loaded from database
> or in Strings hardcoded in .class, but all user inputs were bad decoded.
> I tested it in Windows, MacOS and Linux with the same effect, all tomcat
> distros had factory defaults, well I found the cause (now I'm happy
> ;-)), in server.xml in HTTP Connector there is an attribute
> "URIEncoding" that doesn't appear in default server.xml file, if this
> attribute isn't setted then Tomcat assume by default ISO-8859-1, and as
> you know RAP works with UTF-8 pages, so when RAP try to get a
> request.getParameter(...) the result it isn't correctly processed.
>
> I have to do more test, but now all seems to be OK.
>
> Possibly RAP could include info about this Issue in deployment tutorial
> or wiki, I think that is something to take in account. I was getting mad
> until I see it.
>
> I hope this info can help other in future.
>
> Regards.
> Roberto.
|
|
|
Re: Tomcat encoding Issue [message #26436 is a reply to message #26400] |
Mon, 21 May 2007 04:22  |
Eclipse User |
|
|
|
Originally posted by: fappel.innoopract.com
Hi,
thank you for this useful information. Actually the character encoding of
the request is explicitly set to 'UTF-8', that's the first thing the servlet
in the core of RAP does with every request. So I'm surprised about the
problems you encountered. Seems somehow as if the encoding settings only
work for data that was submitted with HTTP 'post'. We will have a look at
it, to see whether there is a solution without the need for configuration at
deployment time (https://bugs.eclipse.org/bugs/show_bug.cgi?id=188045).
Ciao
Frank
"Roberto S
|
|
|
Powered by
FUDForum. Page generated in 0.40214 seconds