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 <[EMAIL PROTECTED]> 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
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php