#31946 [Opn->Fbk]: Character set used in query not the same as result.
ID: 31946
Updated by: sniper@php.net
Reported By: royberkeveld at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: MySQL related
Operating System: Windows XP Pro
PHP Version: 5.0.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-02-12 15:08:52] royberkeveld at gmail dot com
Description:
------------
When a script's internal character encoding is set to UTF-8, and a
MySQL Query is formed, the result did not contain UTF-8 encoded data.
This changed when upgrading from PHP 5.0.2 to 5.0.3 - it worked fine in
5.0.2. It does not appear MySQL-related since nothing was changed to the
databases. All databases are UTF-8 encoded and the standard character
set is also UTF-8. I am using MySQL 4.1.9 on Apache 2
Reproduce code:
---------------
mb_http_output("UTF-8");
mb_internal_encoding("UTF-8");
// just an example, can be any query
$result = mysql_query("select * from someplace");
$row = mysql_fetch_row($result);
echo $row[0];
Expected result:
----------------
UTF-8 encoded data with all characters intact
Actual result:
--------------
Missing characters due to conversion of UTF-8 database data to Latin-1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31946&edit=1
Thread (4 messages)