The calendar is gone.
Click here to view posts


Db charsets in rails
In case you have set up your db with out utf8 support by default you can change it with active record.

tables = ActiveRecord::Base.connection.execute("show tables;")
tables.each{|table|
 create_table = ActiveRecord::Base.connection.execute("show create
table #{table};")
 unless create_table.fetch_hash["Create Table"].include?("CHARSET=utf8")
   ActiveRecord::Base.connection.execute("ALTER TABLE #{table} CONVERT TO CHARACTER SET utf8;")
 end
}
This is mysql 5.x syntax. This will convert a table from acsii to utf8 or any charset to any charset. I suggest talking to someone how knows more about dbs and knows more about your db before running the script. I am also told it would be a good idea to create a new table just like the old table but with utf8 charset then copy over the data. Makes it easier to debug.