Re: Encoding Japanese characters.

From: Date: Thu, 31 Jul 2003 03:16:26 +0000
Subject: Re: Encoding Japanese characters.
References: 1 2  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-597@lists.php.net to get a copy of this message
Thanks for the tip. I took a look at this but I finally managed to figure out how to do this in PHP natively. Just in case folks are interested: if (mb_detect_encoding($japanese_string)=="SJIS") { $convmap = array(0x0000, 0xffff, 0, 0xffff); $str = mb_encode_numericentity($japanese_string, $convmap, mb_detect_encoding($japanese_string)); print $str; // print encoded string } "Tony Laszlo" <laszlo@issho.org> wrote in message news:Pine.LNX.4.44.0307310859090.23663-100000@asong3.issho.org... > On Thu, 31 Jul 2003, David Powers wrote: > > > You need to find a method of converting Japanese to numeric entities if > > that's the route you want to take. > > Yudit and the accompanying package called uniconv can do that. > > > I have had it happen to me by > > accident, but for anyone who can read Japanese, it's a complete > > nightmare to work with, so it's unlikely to be a function in great > > demand. > > Not necessarily, but I would also advise avoidance of these > special characters, if possible. Murphy's Law states that they > _will_ appear as themselves, not as Japanese characters, at some > time or another. :) > > > > -- > Tony Laszlo > http://www.issho.org/modules.php?op=modload&name=phpWiki&file=index&pagename =La$ > (going for the record - blog with the longest URL) > > >

« previous php.i18n (#597) next »