Unicode makes my brain hurt

A little while ago I mentioned how Lux was adding a Japanese localization. And it did in version 5, along with some other funky languages. Since Lux is written in Java it makes it generally pretty easy to support languages that use extended character sets.

The problem is that the current build of PHP on my server doesn't have multibyte string support in it. So this means that whenever the ranking system or tracker encounter a Japanese or other multibyte character they mess them up.

Checking in my server control panel I see it looks easy enough to rebuild PHP with mbstring support. My powerbook's PHP actually came with mbstring enabled, so I already have a test bed for it.

Except PHP with mbstring enabled doesn't like normal POST data. Or it doesn't translate it how I want it to or something. Fiddling with the php.ini mbstring options doesn't seem to help, and I don't really want to go to the effort of testing multipart/form-data POST data since application/x-www-form-urlencoded is so much simpler.

In short: Bleeeech! Maybe this will end up being an excuse to rewrite some of my PHP into server-side java...

Posted by dustin on May 20, 2005 with category tags of

1 comment
Don't forget to set your content type to UTF-8 and to use the Java String constructor that allows you specify an encoding. Also, if you need to get the bytes that make up the string, there is a getBytes() method that you can pass an encoding to.
   comment by Michael James on May 21, 2005


VorgTag Cloud

Written by dustin
Latest Photo
Quote of Now:
Popular Posts
Computer Games

Hey You! Subscribe to dustin's RSS feed.
Or get wider opinion in the Vorg All Author feed.


Members login here.
© Vorg Group.