Rails, Firefox, Anime, Mac
In: Ruby
15 Mar 2008Just a quick note to self. If you need to store Unicode and are using Sequel, make sure you:
CREATE DATABASE my_db DEFAULT CHARSET utf8;. I think then any tables you create uses the default charset of utf8 unless otherwise specified.:encoding option to Sequel’s MySQL adapter:
DB = Sequel.mysql 'my_db', :user => 'root', :password => '', :host => 'localhost', :encoding => 'utf8'
The Sequel documentation and wiki were quite unhelpful but reading code (see the connect method definition) always helps!
Comments are closed.