Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19618 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48720 invoked by uid 1010); 14 Oct 2005 15:15:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 48703 invoked from network); 14 Oct 2005 15:15:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Oct 2005 15:15:32 -0000 Received: from ([127.0.0.1:3784]) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with ECSTREAM id 76/08-04211-49BCF434 for ; Fri, 14 Oct 2005 11:15:32 -0400 X-Host-Fingerprint: 84.92.162.233 scuzzy.plus.com Linux 2.5 (sometimes 2.4) (4) Received: from ([84.92.162.233:53706] helo=reverseorder.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 3A/03-04211-E58BF434 for ; Fri, 14 Oct 2005 09:53:35 -0400 Received: from reverseorder ([127.0.0.1] helo=reverseorder.net) by reverseorder.net with esmtp (Exim 3.36 #1 (Debian)) id 1EQOyn-0001qX-00 for ; Fri, 14 Oct 2005 13:48:09 +0100 To: internals@lists.php.net Reply-To: scuzzy@reverseorder.net Date: Fri, 14 Oct 2005 13:47:59 +0100 Message-ID: <20051014123957.M42347@reverseorder.net> X-Mailer: Open WebMail 2.41 20040926 X-OriginatingIP: 82.110.77.114 (scuzzy) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=OPENWEBMAIL_ATT_0.704166704629646" Subject: patch to make mysql select correct encoding on client libraries. From: scuzzy@reverseorder.net ("scuzzy") ------=OPENWEBMAIL_ATT_0.704166704629646 Content-Type: text/plain; charset=utf-8 Hi, I've attached a patch, that will allow people to be able to change the client default encoding type, as this was not possible before. I looked through the php mysql client source, and found no traces of something that could actually set the default client encoding type. basically mysql_options(&myHadle, MYSQL_SET_CHARSET_NAME, "utf8"); or whatever charset you choose. It reads the option from the php.ini file, which I've also patched to include the line required, but is commented by default. When it's commented, it falls back to the mysql client library default of latin1. I've read a few forums, and this is apparently a common problem, and I just thought I'd lend a hand to help you guys out. I'm sure you get inundated with stuff like this all the time. Anyway. Take a look at the patch, it's really simple, but it helped us out as a company quite a lot. (www.complinet.com) I hope it helps. Thanks Daine Mamacos. -- random signature ------=OPENWEBMAIL_ATT_0.704166704629646--