Hi:
On Thu, Jan 19, 2012 at 02:27:05PM -0500, Daniel Convissor wrote:
> On Thu, Jan 19, 2012 at 02:09:12PM +0100, Ulf Wendel wrote:
> > Am 19.01.2012 13:50, schrieb Johannes Schlüter:
> > >
> > >Your server seems to be configured for UTF-8 by default. In my tests the
> > >behavior for both libraries (myslqnd& libmsql) is the same if you mind
> > >the character set (use SET NAMES etc.)
>
> Yes, my server is set to UTF-8 in my.cnf:
> character-set-server = utf8
>
>
> > "MySQLnd always assumes the server default charset. This charset is
> > sent during connection hand-shake/authentication, which mysqlnd will
> > use.
> >
> > Libmysql uses the default charset set in the my.cnf or by an
> > explicit call to mysqli_options() prior to calling
> > mysqli_real_connect(), but after mysqli_init().",
> > http://www.php.net/manual/en/mysqli.construct.php
>
> >From the documentation exceprt, above, the test code in
> https://bugs.php.net/bug.php?id=60333 should be using the server's
> default character set under both mysqlnd and libmysql. So shouldn't
> they both come back with the same answer? Or am I misunderstanding
> something?
Hmm. I added a call to $db->character_set_name() in the test script.
Under mysqlnd it returns "utf8" while under libmysql it returns
"latin1". So that explains the difference. But that leads me to
the next head scratcher: why is libmysql not using "the default charset
set in the my.cnf?"
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php