Take the 2-minute tour ×

In my grails application, UTF-8 handling is screwed up when I run under Tomcat as a war. When I do run app, the following request string of:

utf-8-demo-%C3%BC%C4%81%D1%84.txt is set to utf-8-demo-üāф.txt, with 3 unicode escape sequences sent back for each of the unicode characters in the string for all subsequent requests.

Under tomcat, this comes back as utf-8-demo-Ã¼ÄÑ.txt, or utf-8-demo-\u00C3\u00BC\u00C4\u0081\u00D1\u0084.txt.

In one of my controllers, I have this:

String s = params.file
log.info( "Filename: $s" )//works in run-app, fails under tomcat

What could POSSIBLY be causing this behavior dichotomy between run-app and deploying as a war under tomcat?

share|improve this question
Have you followed the steps in wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q2, i.e. set URIEncoding and maybe useBodyEncodingForURI? –  Philipp Reichart Aug 29 '11 at 22:23

1 Answer 1

up vote 2 down vote accepted

Add the attribute URIEncoding="UTF-8" on the <Connector> definition in server.xml.

share|improve this answer

Your Answer


