Hi All,
I am a bit puzzled about the utf8 handling in spring. As I have the following within my web.xml ...
... I was under the impression that it would take care of all the utf8 business for me. Well, I was correct up to some extent... until I realised that the string parameters that I was reading in from the request url (within my controllers) were not being rendered properly !!Code:<filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</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>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
So although non-english characters were treated fine in other parts of the application... when it came to...
... it messed up. I don't fully understand why.... haven't I already specified in my web.xml that it should all be treated as utf-8 ??Code:String searchParameter = ServletRequestUtils.getStringParameter( request, "searchParam", "" )
Any pointers will be appreciated... thanks in advance.


Reply With Quote