Re: mysqli_fetch_field() mysqlnd & libmysql differences

From: Date: Tue, 24 Jan 2012 02:56:00 +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-57486@lists.php.net to get a copy of this message
Hi Johannes: > We have to live with the information the server gives us. The server > gives us the information in bytes. And frankly in PHP a string has no > encoding information, so in many cases that is a good answer. But > nonetheless the documentation should be improved/fixed. Further experimenting reveals that libmysql has the same behavior of multiplying the length of string fields by 3 when the character set is set to "utf8". A related problem was found by the test script. libmysql is completely ignoring the character set information in my.cnf. Plus, if one forces a character set by calling options(SET NAMES utf8) before connecting, character_set_name() still returns unexpected information. Can you please take a look at this test script: http://www.analysisandsolutions.com/php/libmysql.ignoring.character.set.php Thanks, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.internals (#57486) next »