thanks for advice
CREATE TABLE `evenement` (
`titre` varchar(255) NOT NULL default '',
...
) ENGINE=MyISAM AUTO_INCREMENT=2513 DEFAULT CHARSET=latin1
SELECT titre, HEX(titre), LENGTH(titre), CHAR_LENGTH(titre)...
testé | 74657374E9 | 5 | 5
It seems that data is correctly encoded ?
Rick James Wrote:
-------------------------------------------------------
> SET NAMES (and 'char%') relate to whether the
> bytes are transcoded on the way in/out of the server.
-------------------------------------------------------
It seems there is no way to setup connection charset (no config file) with PHP...?! Does it mean that php will always crush the global configuration? Is it really necessary to recompile?
I'll try to look at this file (php_mysql.c), but that would be very surprising that there is no configuration file for mysql_connect with PHP(?)!
php.net / mysql-client-encoding (
64827):
-------------------------------------------------------
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 ;] )
-------------------------------------------------------
Cédric Michel
Site internet