#31946 [NEW]: Character set used in query not the same as result.
| From: | royberkeveld at gmail dot com | Date: | Sat, 12 Feb 2005 14:08:53 +0000 |
| Subject: | #31946 [NEW]: Character set used in query not the same as result. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-73938@lists.php.net to get a copy of this message | ||
From: royberkeveld at gmail dot com
Operating system: Windows XP Pro
PHP version: 5.0.3
PHP Bug Type: MySQL related
Bug description: Character set used in query not the same as result.
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 bug report at http://bugs.php.net/?id=31946&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31946&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31946&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31946&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31946&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31946&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31946&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31946&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31946&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31946&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31946&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31946&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31946&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31946&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31946&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31946&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31946&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31946&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31946&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31946&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31946&r=mysqlcfg