note 82471 added to function.iconv
| From: | wilson_st_ho at hotmail dot com | Date: | Sat, 12 Apr 2008 10:11:22 +0000 |
| Subject: | note 82471 added to function.iconv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138208@lists.php.net to get a copy of this message | ||
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?
----
Server IP: 203.169.164.81
Probable Submitter: 203.218.54.178
----
Manual Page -- http://www.php.net/manual/en/function.iconv.php
Edit -- https://master.php.net/note/edit/82471
Del: integrated -- https://master.php.net/note/delete/82471/integrated
Del: useless -- https://master.php.net/note/delete/82471/useless
Del: bad code -- https://master.php.net/note/delete/82471/bad+code
Del: spam -- https://master.php.net/note/delete/82471/spam
Del: non-english -- https://master.php.net/note/delete/82471/non-english
Del: in docs -- https://master.php.net/note/delete/82471/in+docs
Del: other reasons-- https://master.php.net/note/delete/82471
Reject -- https://master.php.net/note/reject/82471
Search -- https://master.php.net/manage/user-notes.php