Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
1.2.0
-
None
Description
As seen in this code the client settings are copied on connect and are not updated once the connection is made. The following PHP script can be used to show how this causes an unexpected state.
This is very hard to reproduce, but we were able to do it by inserting ISO-8859-1 extended ASCII character (hex 96) into a table and then using this PHP script to show that the output is not the same as when the character set is "utf8".
<?php
|
|
$conn = new mysqli(); |
|
$conn->real_connect($servername, $username, $password, $database); |
|
$conn->set_charset("utf8"); |
|
$r = $conn->query("SELECT notes FROM users WHERE id=3;"); |
$q = $r->fetch_assoc(); |
|
print_r($q); |
I've also attached a screenshot of TCP debugging that shows the failure to set the character set after the fact when running the above script.