Re: Encoding Japanese characters.

From: Date: Wed, 30 Jul 2003 23:11:28 +0000
Subject: Re: Encoding Japanese characters.
References: 1  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-594@lists.php.net to get a copy of this message
Inwards wrote: > > - I have a string containing a Japanese phrase. mb_detect_encoding() > reports it as SJIS. > - I want to display this string in HTML without changing the encoding > type (ISO-8859-1). You can't. If you want to support Japanese in a web page, you have to use an encoding that supports Japanese - UTF-8, Shift_JIS, EUC-JP, for example. > - In order to accomplish this, I would like to encode the text as > Unicode values. I have seen a nice example of this in action here: > http://www.animenewsnetwork.com/encyclopedia/anime.php?id=4 so > I know > that it is possible. That page doesn't use Japanese, but HTML numeric entities: 科学忍者隊ガッチャ マン You need to find a method of converting Japanese to numeric entities if that's the route you want to take. 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. David Powers ******************************************* No-nonsense reviews of computer books http://japan-interface.co.uk/webdesign/books.html Save 10% on TopStyle CSS Editor *******************************************

« previous php.i18n (#594) next »