Tag Archives: utf8

UTF-8 on Tomcat

I use Apache httpd + mod_jk with tomcat and connect to port 8009. Be sure to tell the tomcat connection that you are using UTF-8.

# vi /usr/local/tomcat/conf/server.xml

<Connector
port=”8009″
URIEncoding=”UTF-8″
enableLookups=”false”
redirectPort=”8443″
protocol=”AJP/1.3″ />

Add two parameters to the list of JAVA_OPTS (at least for tomcat)

-Djavax.servlet.request.encoding=UTF-8
-Dfile.encoding=UTF-8″

Character codes and encoding

Character codes and encoding
In the beginning, there was ASCII. (There were others, but we begin here with ASCII).
7-bit ASCII in an 8-bit package. Using only the first seven bits of a byte, standard ASCII could not deal with diacritical marks (accents and funny dots in the vulgar vernacular). Therefore, the German word for later, später, [...]