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

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in 5.3-CVS


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