There is an old skool multi-relational database call Universe, which is now owned by IBM. They have some proprietary java classes that you can use for database access (their own API, not some standard one) called Universe Objects, or uvobjects. Anyway, I have some java apps deployed in tomcat that use this. With the locale set to a sensible UTF8, uvobjects doesn't read or write to the database properly, no errors, just broken data.... grrr.... To get it to work in Ubuntu/Debian you must do the following:
- Get java, tomcat, universe, your application, etc installed.
- Generate a locale for en_US.ISO-8859-15:
$ sudo locale-gen en_US.ISO-8859-15
- Get tomcat to use this new locale:
$ sudo cat >> /etc/default/tomcat5 # fix LANG for Universe LANG=en_US.iso885915 LC_ALL=en_US.iso885915
Type Cntl-D to get back to your shell prompt.
- Restart tomcat:
sudo /etc/init.d/tomcat5 restart
I know we supposedly genned a ISO-8859-15 locale, and we have to sent LANG to that without the dashes. You will need a smarter localizer than me to tell you why. I just know that this works. I realize this is a total hack; if you have other apps in this tomcat instance that need UTF8, then you are hosed. Too bad. But this makes it so your apps that use Universe for a database work.