Re: mysqli_fetch_field() mysqlnd & libmysql differences
| From: | Ulf Wendel | Date: | Thu, 19 Jan 2012 19:40:52 +0000 |
| Subject: | Re: mysqli_fetch_field() mysqlnd & libmysql differences | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-57432@lists.php.net to get a copy of this message | ||
Am 19.01.2012 20:27, schrieb Daniel Convissor:
Gentlemen: On Thu, Jan 19, 2012 at 02:09:12PM +0100, Ulf Wendel wrote:mysqlnd simply does not read MySQL server config. It defaults to actual connection of the server. UlfAm 19.01.2012 13:50, schrieb Johannes Schlüter:Yes, my server is set to UTF-8 in my.cnf: character-set-server = utf8Your server seems to be configured for UTF-8 by default. In my tests the behavior for both libraries (myslqnd& libmsql) is the same if you mind the character set (use SET NAMES etc.)"MySQLnd always assumes the server default charset. This charset is sent during connection hand-shake/authentication, which mysqlnd will use. Libmysql uses the default charset set in the my.cnf or by an explicit call to mysqli_options() prior to calling mysqli_real_connect(), but after mysqli_init().", http://www.php.net/manual/en/mysqli.construct.phpFrom the documentation exceprt, above, the test code inhttps://bugs.php.net/bug.php?id=60333 should be using the server's default character set under both mysqlnd and libmysql. So shouldn't they both come back with the same answer? Or am I misunderstanding something?