note 64827 added to function.mysql-client-encoding

From: Date: Fri, 21 Apr 2006 11:57:23 +0000
Subject: note 64827 added to function.mysql-client-encoding
Groups: php.notes 
Request: Send a blank email to php-notes+get-108916@lists.php.net to get a copy of this message
The right lines to put in /etc/my.cnf (or other MySQL options file) are: [client] init-command="SET NAMES utf8" Unfortuantely the PHP mysql_connect() function does not use MySQL options files so this is not a sollution for changing the default connection character set for mysqlclient library v4.1+. The only working sollution remains: mysql_query("SET NAMES utf8", $conn); (of course /ext/mysql/php_mysql.c can always be patched ;] ) ---- Server IP: 217.75.128.29 Probable Submitter: 217.30.208.150 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-client-encoding.php Edit -- http://master.php.net/note/edit/64827 Del: integrated -- http://master.php.net/note/delete/64827/integrated Del: useless -- http://master.php.net/note/delete/64827/useless Del: bad code -- http://master.php.net/note/delete/64827/bad+code Del: spam -- http://master.php.net/note/delete/64827/spam Del: non-english -- http://master.php.net/note/delete/64827/non-english Del: in docs -- http://master.php.net/note/delete/64827/in+docs Del: other reasons-- http://master.php.net/note/delete/64827 Reject -- http://master.php.net/note/reject/64827 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#108916) next »