View Single Post
  #2 (permalink)  
Old 01-23-04, 01:43 AM
blaw's Avatar
blaw blaw is offline
Junior Code Guru
 
Join Date: Dec 2003
Location: Vancouver, BC, Canada
Posts: 550
Thanks: 0
Thanked 0 Times in 0 Posts
Hi.

The best way to deal with Japanese encoding (or any multi-byte codes) in PHP is to use mbstring extension. I believe there is a function(s) that converts among those Japanese encoding scheme, including the ones you are inquiring about. I assume you read Japanese:

PHP.net Manual mbstring
http://www.php.net/manual/ja/ref.mbstring.php

I believe it's bundled with PHP by default (ver.4.2x or later), but you must enable it when you compile PHP with --enable-mbstring (and --enable-mbstr-enc-trans if your PHP is earlier than 4.30 and --enable-mbregex if you need Japanese regular expressions).

If you somehow can't do this (e.g. shared server, don't-know-how, etc), you can try jcode.phps, which does not require any modification to your PHP setting:

http://www.spencernetwork.org/

Finally there are many articles written in Japanese that deal with Japanese encoding scheme in PHP, as well as the Japanese PHP communities (such as http://www.php.gr.jp/ ) - you may want to check those out, too.

Good luck.
__________________
Blavv =|
Reply With Quote