Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24285 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22990 invoked by uid 1010); 6 Jul 2006 16:01:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 22975 invoked from network); 6 Jul 2006 16:01:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jul 2006 16:01:27 -0000 Authentication-Results: pb1.pair.com header.from=olivier.hill@gmail.com; domainkeys=good DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: olivier.hill@gmail.com X-Host-Fingerprint: 64.233.182.187 nf-out-0910.google.com Linux 2.4/2.6 Received: from ([64.233.182.187:44939] helo=nf-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 76/1B-16663-5D33DA44 for ; Thu, 06 Jul 2006 12:01:26 -0400 Received: by nf-out-0910.google.com with SMTP id o25so227162nfa for ; Thu, 06 Jul 2006 09:01:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=o7V9+TzS1i8kqwFbbz59dYYDJ7NJ6pzxBvFMJXDmLXACFCimxs8tIiuGxhS+jkRYjLFwj6VX/YmNAVBEK3XN005G2/5TO1T2wd5n3gr3jSDd2GRagujT0s7L0e1tLhRn2HVSbVCF39RSjHbgIy7mp7Ncm94tw1boFQesomRsaQ4= Received: by 10.78.167.12 with SMTP id p12mr266845hue; Thu, 06 Jul 2006 09:01:22 -0700 (PDT) Received: by 10.78.119.5 with HTTP; Thu, 6 Jul 2006 09:01:22 -0700 (PDT) Message-ID: Date: Thu, 6 Jul 2006 12:01:22 -0400 To: "Antony Dovgal" Cc: internals In-Reply-To: <44AD307D.6020908@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44AD307D.6020908@zend.com> Subject: Re: [PHP-DEV] PATCH - Charset in ext/mysql From: olivier.hill@gmail.com ("Olivier Hill") Hello Antony, I've realized 5 minutes after posting that I would receive an answer like this. I am aware that this is a bugfix only branch, but for us this was a bug. We were moving to new servers compiled against MySQL 4.1 libs and not the bundled ones with PHP. With this move, things got from latin1 to utf8 and since PHP 4 doesn't really care about Unicode, we had to come up with this fix. Looking at the comments in the docs on php.net, we were not the only one with this problem. [1] I do not really care it the patch makes it to the core, I just wanted to post it so other people having to deal with PHP4 and newer MySQL versions can use this trick. In our case, MySQLi wasn't an option. We will be upgrading to PHP5 shortly on our production servers, but in the meantime this is an easy fix. Sincerely, Olivier [1] http://ca.php.net/manual/en/function.mysql-client-encoding.php On 7/6/06, Antony Dovgal wrote: > On 06.07.2006 19:36, Olivier Hill wrote: > > Hello internals, > > > > Attached is a patch against PHP_4_4 allowing to specify a charset when > > talking to MySQL using ext/mysql and client libraries that come with > > MySQL >= 4.1.13 (the default being utf8). > > > > This was mainly tested with latin1. To test, add an ini entry like this: > > > > mysql.default_charset = "latin1" > > > > Any constructive comments on the patch would be appreciated. > > IIRC such patch has been already discussed and rejected. > > Also, PHP 4.x is bugfix branch and NO new features will be added there. > In 5.x there is ext/mysqli, which have much more functionality than ext/mysql and you should be using it instead. > > -- > Wbr, > Antony Dovgal >