note 82471 rejected from function.iconv by nlopess
| From: | nlopess@php.net | Date: | Sat, 12 Apr 2008 10:23:22 +0000 |
| Subject: | note 82471 rejected from function.iconv by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-138209@lists.php.net to get a copy of this message | ||
Note Submitter: wilson_st_ho at hotmail dot com
----
I would like to develop a form and accepting chinese (traditional & simplified) characters. And
all chinese should be converted into traditional chinese characters but in form of UTF-8, then put
into MySQL database. I tried in both LINUX & WindowsXP. LINUX has no problem (seems correct) on
converting UTF-8 -> GB2312 -> BIG5 -> UTF-8. But under WindowsXP, I couldn't find any
reason the conversion fail on GB2312 -> BIG5 step.
Platform1: Fedora6/Apache2/PHP5/MySQL5
Platform2: WindowsXP-SP2/Apache2.2/PHP5.2/MySQL5
code:
$tmp1 = iconv("UTF-8", "GB2312", $_POST[txt]);
$tmp2 = iconv("GB2312", "BIG5", $tmp1);
$tmp3 = iconv("BIG5", "UTF-8", $tmp2);
Anyone knows what problem?