#37867 [NEW]: MySQL extension lacks charset function
| From: | yu at nic dot fujitsu dot com | Date: | Wed, 21 Jun 2006 04:14:20 +0000 |
| Subject: | #37867 [NEW]: MySQL extension lacks charset function | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-98611@lists.php.net to get a copy of this message | ||
From: yu at nic dot fujitsu dot com
Operating system: NetBSD 3.0
PHP version: 4.4.2
PHP Bug Type: MySQL related
Bug description: MySQL extension lacks charset function
Description:
------------
MySQL4.1 and MySQL5 have a function,
mysql_set_character_set(), which sets up MySQL internal
character set.
To set MySQL character set correctly both in client-side
and in server-side, calling this function is the only
right way after the connection is created (by mysql_real_connect()).
It is not right to call "set names" SQL statement by
mysql_query, because this call sets only in server-side
charset. To set up client-side charset, mysql_set_character_set() is
needed. But PHP4.4.2 and 5.1.4
have no interface to call this function.
(There is another way to set charset correctly.
Calling mysql_options() with MYSQL_SET_CHARSET_NAME before
mysql_real_connect() do the same thing internally.
But PHP4.4.2 and 5.1.4 don't have this interface.)
--
Edit bug report at http://bugs.php.net/?id=37867&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37867&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37867&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37867&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37867&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37867&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37867&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37867&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37867&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37867&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37867&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37867&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37867&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37867&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37867&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37867&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37867&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37867&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37867&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37867&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37867&r=mysqlcfg