[solved] Tomcat 6 UTF-8 encoding issue
Posted by Kelvin on 08 Oct 2013 at 11:13 pm | Tagged as: programming
If after following all the instructions in the Tomcat docs for enabling UTF-8 support (http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8) and you still run into UTF-8 issues, and your webapp involves reading and displaying the contents of files, give this a whirl.
In catalina.sh, either at the top of the file or after the long comments, insert this:
export CATALINA_OPTS="$CATALINA_OPTS -Dfile.encoding=UTF-8"