[Rails I18n] mysql character set

Tomislav Filipčić tomislav at filipcic.com
Wed Jan 10 16:01:11 EST 2007


Ingo Weiss wrote:
> Ingo Weiss wrote:
>> Hi all,
>>
>> I am just familarizing myself
> 
> Oops, this one got sent prematurely...
> 
> what I was going to ask is how to set the mysql character sets from 
> Rails. I did set my database's character set to utf-8 when creating it - 
> do I even need to set each table's character set then?  If yes, how is 
> it done in a migration, when creating the table?

In config/database.yml set the encoding to utf8 for each enviroment. 
Like this:

development:
   adapter: mysql
   database: app_development
   username: root
   password:
   host: localhost
   encoding: utf8


I think is is only for Rails 1.2



More information about the Railsi18n-discussion mailing list