Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57486 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46037 invoked from network); 24 Jan 2012 02:56:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2012 02:56:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=danielc@analysisandsolutions.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=danielc@analysisandsolutions.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain analysisandsolutions.com from 166.84.1.89 cause and error) X-PHP-List-Original-Sender: danielc@analysisandsolutions.com X-Host-Fingerprint: 166.84.1.89 mailbackend.panix.com Solaris 10 (beta) Received: from [166.84.1.89] ([166.84.1.89:40346] helo=mailbackend.panix.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/C1-36880-3CD1E1F4 for ; Mon, 23 Jan 2012 21:56:04 -0500 Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mailbackend.panix.com (Postfix) with ESMTP id 317A62EF56; Mon, 23 Jan 2012 21:56:01 -0500 (EST) Received: by panix5.panix.com (Postfix, from userid 14662) id EE9A424258; Mon, 23 Jan 2012 21:56:00 -0500 (EST) Date: Mon, 23 Jan 2012 21:56:00 -0500 To: Johannes =?utf-8?B?U2NobMO8dGVy?= Cc: PHP Internals List , Ulf Wendel Message-ID: <20120124025600.GA337@panix.com> References: <20111118210619.GA13490@panix.com> <1326977447.2722.10.camel@guybrush> <20120121133107.GA7255@panix.com> <1327311604.5972.51.camel@guybrush> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1327311604.5972.51.camel@guybrush> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [PHP-DEV] mysqli_fetch_field() mysqlnd & libmysql differences From: danielc@analysisandsolutions.com (Daniel Convissor) 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