Ricardo Junior wrote:
> Hi people !
> 
> I have a query regarding double-byte languages on PHP. 
> I need to sort a index localized from English to Korean.
> 
> My idea is:
> *     get the Korean strings from file;
> *     convert them to UTF8;
> *     insert them in a Oracle database set to work with UTF8;
> *     set "NLS_LANG" with "Alter session" SQL command to this variable
> match with Korean language;
> *     get the strings sorted by Oracle with a "SELECT * FROM table SORT BY
> field ASC" SQL command;
> 
> I've tried to convert the Korean string to UTF8 with utf8_encode function,
> but this function converted each byte from double-byte string to its
> relative in UTF8 chars.
> Reverting this string encoded to UTF8 with utf8_decode function, the browser
> can display successfully the Korean chars (because the individual bytes of
> the double-byte string will be as them were before), but Oracle can't sort
> the strings properly because that UTF8 chars converted by utf8_encode
> function were not relative to a double-byte char, but relative to a 2 single
> bytes chars!
> 
> How can I convert a double-byte string to UTF8 properly???
> 
> 
> Really thanks !!!!

UTF-8 works but EUC-KR may be better.
Anyway, take a look at mbstring, iconv, gettext modules.

-- 
Yasuo Ohgaki


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to