From: Panagiotis Atmatzidis Date: 2013-07-09T04:39:55+09:00 Subject: UTF-8 and MySQL Hello, I'm having a hard time extracting UTF-8 chars from Ruby in FreeBSD 9.1. In my "my.cnf" I have the following config: [client] default-character-set=utf8 port = 3306 socket = /tmp/mysql.sock # The MySQL server [mysqld] (...) # encoding issues character-set-server=utf8 collation-server=utf8_general_ci To connect I use sequel gem, using encoding: 'utf8' option. I can browse the database and clearly see the results in utf8 using Sequel Pro (a GUI MySQL browser for mac) but when I'm doing my tests root@atma-vps:/root # cat /home/atma/test.rb #!/usr/bin/env ruby # encoding: UTF-8 require 'sequel' msql = Sequel.connect('mysql://atma:toola697@localhost/metrosignage') b = msql[:drama_addressbook] b.each do |entry| p entry end I see only 8-BIT ASCII and of course the unicorn comes out with an error. Panagiotis (atmosx) Atmatzidis email: atma@convalesco.org URL: http://www.convalesco.org GnuPG ID: 0x1A7BFEC5 gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5 -- The wise man said: "Never argue with an idiot. They bring you down to their level and beat you with experience."