Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19659 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33083 invoked by uid 1010); 17 Oct 2005 09:24:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 33068 invoked from network); 17 Oct 2005 09:24:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Oct 2005 09:24:50 -0000 X-Host-Fingerprint: 84.92.162.233 scuzzy.plus.com Linux 2.5 (sometimes 2.4) (4) Received: from ([84.92.162.233:55087] helo=reverseorder.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 7E/BD-22302-FDD63534 for ; Mon, 17 Oct 2005 05:24:49 -0400 Received: from reverseorder ([127.0.0.1] helo=reverseorder.net) by reverseorder.net with esmtp (Exim 3.36 #1 (Debian)) id 1ERRE1-0003Po-00 for ; Mon, 17 Oct 2005 10:24:09 +0100 To: internals@lists.php.net Reply-To: scuzzy@reverseorder.net Date: Mon, 17 Oct 2005 10:24:09 +0100 Message-ID: <20051017092409.M27759@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.876263565707148" Subject: [PATCH] patch to make mysql select correct encoding on client libraries. From: scuzzy@reverseorder.net ("scuzzy") ------=OPENWEBMAIL_ATT_0.876263565707148 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: ; mysql.default_character_set = "utf8" 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.876263565707148--