[prev in list] [next in list] [prev in thread] [next in thread]
List: php-i18n
Subject: Re: [PHP-I18N] Encoding Japanese characters.
From: 24.42.79.145
Date: 2003-07-31 3:16:26
[Download RAW message or body]
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)
>
>
>
--
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic