Hi! I am developing an application which should work under different languages (german, spanish, etc). The application uses an Oracle DB. I have CRUD business processes and I have the standard views (create, edit, show, list). No problems for creating, showing and listing any record containing special chars like ä,ö,ü, etc. But when I edit any entry containing any of this characters I am getting the encoded version. i.e. & auml; instead of ä & ouml; instead of ö & uuml; instead of ü
and so on.
Any hint how to solve this problem?
Thanks!
UPDATE Thanks for your help. I will describe the complete scenario:
I have a web application written in grails (groovy on grails). For developing I am using Jetty as server and Oracle 10g. For testing and production I am using Tomcat 6.0.18 and Oracle 10g Java version is 1.6.0_02
I have many CRUD processes (create, retrieve, update, delete). The application is multilanguage. That is, ä, ö, ü, ß, á, é, í, ó, ú letters (characters) must be allowed as content.
Views are written in gsp. I am using standard .gsp views (create, edit, show, list). No problem with create, show, list. That is, if under the create view I type any word using this special characters then this will be shown or listed correctly under the show.gsp or list.gsp
The problem arises when editing a record containing such characters. Instead of -let's say- ä appears in the field an & auml; (this is the html encoding of ä).
I have the following settings:
under Config.groovy grails.views.gsp.encoding="UTF-8" grails.converters.encoding="UTF-8"
Every .gsp page has the following meta tag:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" pageEncoding="UTF-8"/>
Every form has the following attribute:
<g:form accept-charset="UTF-8" method="post" >
Under Tomcat I did the following settings.
tomcat is started with the following options:
CATALINA_OPTS=-Dfile.encoding=UTF-8
JAVA_OPTS="-Duser.language=de -Duser.country=DE"
Under web.xml I set the following filter
<filter>
<filter-name>SetCharacterEncoding</filter-name>
<filter-class>filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
Under myApplication/WEB-INF/classes/filters I copied the SetCharacterEncodingFilter.class from examples/WEB-INF/classes/filters
Under server.xml I set the following connector:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" useBodyEncodingForURI="UTF-8" />
The scenario is as follows: The server receives a request for editing a form. The server is retrieving the info from the DB and then either the DB is sending the information already html encoded (I don't think so) or the server is encoding it and sending it encoded to the client.
Moreover, at my controller I can see that the retrieved information from the server is not html encoded.
I don't know which setting has to be done in order to cope this encoding problem (which is taking me a lot, a lot of time and effort).
Thanks a lot in advance.
Luis