[Openmcl-devel] Using clsql (:mysql) to retrieve Unicode strings from a database

Tom Emerson tremerson at gmail.com
Fri Mar 25 10:23:39 PDT 2011

Hi all,

I'm trying to use the latest CLSQL (with the MySQL backend) to retrieve rows
from a database that is using UTF-8 for the VARCHAR columns.

I had hoped that specifying UTF-8 when opening the connection would be
sufficient, e.g.

(clsql:connect '(nil "database" "user" "password") :database-type :mysql
:encoding :utf-8)

would be sufficient, but any query that includes a UTF-8 column has the
database coming back as ?s.

Has anyone had success doing this? I did try


before connecting or making the query, but that didn't help (and shouldn't
be necessary regardless.)

Thanks in advance for any insight you may have.


P.S. CCL 1.7-dev-r14672M-trunk, 64-bit build. MySQL 5.1.49. I have Python
code that can retrieve data from the same database without a problem, so I
know it is possible to do. I'd rather stop using Python though.

Tom Emerson
tremerson at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20110325/327294e8/attachment.htm>

More information about the Openmcl-devel mailing list