require "mysql" db = Mysql.new("localhost","username","password","database") puts db.character_set_name #output #latin1
require "mysql" db = Mysql.init db.options(Mysql::SET_CHARSET_NAME,"utf8") db.real_connect("localhost","username","password","database") puts db.character_set_name #output #utf8