Re: MySQL v. PostgreSQL

"Markus Hoenicka" <[email protected]> Fri, 20 Feb 2009 00:00:45 +0100
Newsgroups gmane.text.refdb.general
Message-ID <[email protected]>
Torsten Bronger writes:
 > bronger@wilson:~$ iconv -l|grep -i utf8
 > ISO-10646/UTF8/
 > UTF8//
 > 

That explains why refdbd does not bail out. Instead it has iconv
convert the data from utf-8 to utf-8...

 > -  RefDB encodes the UTF-8 data that it gets from me again, but it
 >    does so after it prints it to the log output, or
 > 

No, it doesn't. Most of the code looks like this chunk:

--8<----
      sprintf(sql_command, "INSERT INTO t_user (user_name) VALUES (%s)", quoted_user);

      LOG_PRINT(LOG_DEBUG, sql_command);

      dbires1 = dbi_conn_query(conn, sql_command);
--8<----

i.e. the query string is assembled, and the very same string is first
written to the log and then sent to the database engine.

 > -  RefDB passes UTF-8 data to the database and tells MySQL that it's
 >    Latin-1.
 > 

I recall having a bug in the mysql driver which might cause just this
(the connection encoding was not set properly, so libmysqlclient and
the server used different encodings which MySQL transforms for us,
helpful as it is). This bug was fixed a while ago. Which version of
libdbi and libdbi-drivers are you using?

regards,
Markus

-- 
Markus Hoenicka
[email protected]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H