apache apachecon app apple asf atom atomprotocol atompub barcamprdu blogapps blogging businessblogging conferences family feeds foss general glassfish google humor ibm java javaone links linux mac microsoft movies music netbeans opensocial opensource photos politics rest roller rome rss socialnetworking socialsite socialsoftware sun triangle trianglebloggers vacation webdev webservices wiki


Thursday Apr 15, 2004

i18n test - I�t�rn�ti�n�liz�ti�

I�t�rn�ti�n�liz�ti�n. Making Sam Ruby's suggested I18N test work in Roller required a code change and a configuration file change. First, the code change: I added the following line to force incoming form data to be parsed as UTF-8.

request.setCharacterEncoding("UTF-8");
The config change: I updated my velocity.properties file to support UTF-8:
input.encoding=UTF-8
output.encoding=UTF-8
default.contentType=text/html; charset=utf-8

Unfortunately, this breaks comments as you will see if you try to leave a comment. I'm working on this now.

Update: Roller followed a linkback to Simon Brown's I�t�rn�ti�n�liz�ti�n post, and lookee there, linkbacks need work too.

Another update: I'm tracking this in JIRA as bug ROL-341. By the way, it appears that JIRA handles i�t�rn�ti�n�liz�ti�n flawlessly.

Yet another update: Thanks to a suggestion from David Czarnecki, who literally wrote the book on Java Internationalization, comments are working on posts with I18N titles. I had to add URIEncoding="UTF-8" in the Tomcat Connector configured in server.xml:

    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 10039 -->
    <Connector port="10039"
               enableLookups="false" redirectPort="10033" debug="0"
               protocol="AJP/1.3" URIEncoding="UTF-8" />

Roller Hacks

This work is licensed under a Creative Commons License.
Copyright 2002-2007, David M Johnson (dave.johnson at rollerweblogger.org)

This is a personal weblog, I do not speak for my employer.