Re: Where does the mysqli extension find the default connection charset?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux