From: [EMAIL PROTECTED] Operating system: linux PHP version: 5.3CVS-2008-01-13 (CVS) PHP Bug Type: MySQLi related Bug description: mysqi_get_charset() doesn't expose charset comment
Description: ------------ The mysql C API exposes a charset comment field (see http://dev.mysql.com/doc/refman/5.1/en/mysql-get-character-set-info.html) which exposes extra information on the character set. The information is the same as in the "Description" result column returned by "SHOW CHARSET;" IMHO the charset comment should be part of the mysqli_get_charset() result. Adding this to "classic" ext/mysqli is easy but getting this into mysqlnd seems to be more tricky Reproduce code: --------------- <?php $db = mysqli_init(); $db->real_connect("localhost", "root", "", "test"); var_dump($db->get_charset()); ?> Expected result: ---------------- object(stdClass)#2 (8) { ["charset"]=> string(6) "latin1" ["collation"]=> string(17) "latin1_swedish_ci" ["dir"]=> string(0) "" ["min_length"]=> int(1) ["max_length"]=> int(1) ["number"]=> int(8) ["state"]=> int(801) ["comment"]=> string(20) "cp1252 West European" } Actual result: -------------- object(stdClass)#2 (8) { ["charset"]=> string(6) "latin1" ["collation"]=> string(17) "latin1_swedish_ci" ["dir"]=> string(0) "" ["min_length"]=> int(1) ["max_length"]=> int(1) ["number"]=> int(8) ["state"]=> int(801) } -- Edit bug report at http://bugs.php.net/?id=43832&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43832&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43832&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43832&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43832&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43832&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43832&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43832&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43832&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43832&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43832&r=support Expected behavior: http://bugs.php.net/fix.php?id=43832&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43832&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43832&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43832&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43832&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43832&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43832&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43832&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43832&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43832&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43832&r=mysqlcfg