# Mysql character set

**URL:** <https://www.ruby-forum.com/t/mysql-character-set/81601>\
**Category:** Rails I18n\
**Created:** [January 10, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/mysql-character-set/81601 "2007-01-10T13:33:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [January 10, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/mysql-character-set/81601/1 "2007-01-10T13:33:04Z")

</div>

Hi all,

I am just familarizing myself

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [January 10, 2007, 1:36pm UTC](https://www.ruby-forum.com/t/mysql-character-set/81601/2 "2007-01-10T13:36:43Z")

</div>

Ingo W. 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?

Thanks!  
Ingo

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [January 10, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/mysql-character-set/81601/3 "2007-01-10T23:08:43Z")

</div>

Ingo W. wrote:

> 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
