Re: Where does the mysqli extension find the default connection charset?
| From: | Jean-Noël Rivasseau | Date: | Thu, 03 May 2007 07:08:37 +0000 |
| Subject: | Re: Where does the mysqli extension find the default connection charset? | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-43535@lists.php.net to get a copy of this message | ||
Hello and thanks for your help,
However, my question was: *how* is it package dependent? You said that it
uses libmysql. In this case, which file controls the configuration of
libmysql? Or is it at compilation time that the choice is made?
I know that to be of the safe side, I should explicitly set the character
set.
Jean-Noel
On 5/2/07, Georg Richter <georg@mysql.com> wrote:
Jean-Noël Rivasseau wrote: Hello there, I'd like to know which configuration file or setting is used by PHP mysqli extension to know the default charset connection to the database. mysqli (and also mysql) extension uses the default character set for libmysql This can be package dependend: Several distros deliver utf8 as default, others latin1. To be on the safe side, you should call mysqli_set_charset($link, "utf8/latin1/whatever) to set the character set for each connection. /Georg -- Georg Richter, Development Manager - Connectors & Client Connectivity MySQL GmbH, Radlkoferstr. 2, D-81373 München, www.mysql.com Geschäftsführer: Hans von Bell, Kaj Arnö - HRB München 162140