ID:               43832
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Assigned
 Bug Type:         MySQLi related
 Operating System: linux
 PHP Version:      5.3CVS-2008-01-13 (CVS)
-Assigned To:      
+Assigned To:      andrey


Previous Comments:
------------------------------------------------------------------------

[2008-01-13 21:11:37] [EMAIL PROTECTED]

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 this bug report at http://bugs.php.net/?id=43832&edit=1

Reply via email to