We are passing "reifengr��e" which has 2 special German characters in the URL query string value. The request is received from the browser correctly encoded as "reifengr%C3%B6%C3%9Fe". But then the Spring MVC framework decodes it using default "ISO-8859-1" which results in "reifengrö�Ÿe" (wrong value).
We tried overriding this behavior by defining a filter that sets UTF-8 as the encoding
in the request but it does not work (even though the filter gets called before the Dispatcher Servlet). Also, tried adding below lines in the web.xml ...
*********************************************
<filter>
<filter-name>encoding-filter</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFi lter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encoding-filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
*********************************************
before the dispatcher servlet but it did not work. We are using spring 3.0.0.RELEASE jars.
Is there a bug in the MVC framework ? What am I missing here ? Do I need to do anything additional ? Any help in this regard will be appreciated ?
Thanks.


Reply With Quote
