2010/01/11

CLSQL MySQL UTF8

次の3つを utf8 にすれば大丈夫みたい。きっとね。

  • character_set_client
  • character_set_connection
  • character_set_results
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :clsql))

(clsql-sys:connect '("localhost" "blog_development" "root" "")
:database-type :mysql)

(clsql-sys:execute-command "set character_set_client='utf8'")
(clsql-sys:execute-command "set character_set_connection='utf8'")
(clsql-sys:execute-command "set character_set_results='utf8'")
;;(clsql-sys:query "show variables like 'char%'")

(clsql-sys:query "select 'まみむめも♪', posts.* from posts")

0 件のコメント: