note 56152 deleted from function.ord by danbrown

From: Date: Tue, 11 Oct 2011 16:11:11 +0000
Subject: note 56152 deleted from function.ord by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-183803@lists.php.net to get a copy of this message
Note Submitter: zhangweiwu at realss dot com ---- For getting UTF16 value of Chinese ideographs: PLEASE ALWAYS use the uniord() ng4rrjanbiah at rediffmail dot com (#46267) but do not use #42778's method. native mbstring has problem with Chinese charset. For simplified Chinese it only (afaik) can deal with characters with GB2312 charset, that means a lot of person names will fail. for example, if you pass U+97E1 to uniord as provided by #42778 you will get value is 'E1', this is incorrect. the '97' part is ignored by mbstring when doing conversion. another suggestion is never use mb_convert_encoding for simplified Chinese at all. Use iconv instead. I am the one in greater trouble with it because my own name gets lots everytime mbstring wishing to convert something.

« previous php.notes (#183803) next »