aku-aku: v.. To move a tall, flat bottomed object (such as a bookshelf) by swiveling it alternatively on its corners in a "walking" fashion. [After the book by Thor Heyerdahl theorising the statues of Easter Island were moved in this fashion.] source: LangMaker.com. Aku Aku also has another meaning to the islanders: a spiritual guide.
« tokyo tidbits | Main Page | ilya and loop drop »
JIS X 0208 decoding
Posted by dav at 2002 December 8 02:05 PM
File under: Geek

I hacked up some perl code that will process the emails Mie sends me from her cell phone and translate the JIS X 0208 character set into Unicode HTML Entities.

#look for the JIS X 0208-1983 enocded block
# (see http://lfw.org/text/jp.html#iso2022)
while ($message =~ /(\x1b\x24\x42)(.+)(\x1b\x28\x42)/) {
$encoded = $2;
$message =~ s/\x1b\x24\x42//;
$message =~ s/\x1b\x28\x42//;
$unicodeEntities = &decode( $encoded );
$message =~ s/$encoded/$unicodeEntities/;
view full code

Doing it this way requires that the browser has the Japanese character set installed (which is easy to do for MSIE or Mozilla/Netscape) ...but I might consider instead translating the japanese characters to a series of small gifs for those who are not willing to install the character set (like Shoduka). I -am- lazy though.


You go, code warrior.

Posted by: Laura on December 10, 2002 07:34 AM

Post a new comment:

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Remember me?