#35183 [Opn->Fbk]: write into mysql with utf8 not

From: Date: Thu, 10 Nov 2005 16:24:11 +0000
Subject: #35183 [Opn->Fbk]: write into mysql with utf8 not
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87996@lists.php.net to get a copy of this message
ID: 35183 Updated by: tony2001@php.net Reported By: lzx21cn at 21cn dot com -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: debian testing accuracy PHP Version: 4.4.1 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2005-11-10 16:36:28] lzx21cn at 21cn dot com Description: ------------ write in mysql by utf8 it is wrong! Reproduce code: --------------- 1.modify php.ini ... mbstring.internal_encoding = UTF-8 mbstring.http_output = UTF-8 mbstring.detect_order = UTF-8 2. php file (utf8) $sql="insert into test1 values(2,'四大皆空');"; mysql_query($sql); Expected result: ---------------- *record where id=1 is inputed in gnome-terminal ---- command: mysql IN gnome-terminal (utf8) ---- select * from test1; id | name 1 | 皆大欢喜 2 | 四大皆空 -------------------------------------------------- Actual result: -------------- ---- command: mysql IN gnome-terminal (utf8) ---- select * from test1; id | name 1 | 皆大欢喜 2 | (something character which I unknow) -------------------------------------------------- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35183&edit=1

« previous php.bugs (#87996) next »