QFC: A note for Japanese users
| From: | Ignatius Reilly | Date: | Thu, 26 Feb 2004 17:27:00 +0000 |
| Subject: | QFC: A note for Japanese users | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-10966@lists.php.net to get a copy of this message | ||
I am currently developing a multi-language application with QFC including
Japanese.
I found that QF encodes the content of the container with numeric entities.
So prior to passing the container's data to a SQL query, one must decode
them
The following function does the job (found on a mailing list, the PHP
manual - quite unusually - is not very clear):
function n_to_c( $str ) {
/*
Decode multibyte numeric entities into UTF-8
Requires multi-byte support
*/
return mb_decode_numericentity( $str, array(0x0, 0x2FFFF, 0, 0xFFFF),
"UTF-8" ) ;
}
HTH
Ignatius