MySQL encoding problem
Posted by: garylin
Posted on: 2006-01-21 05:32:00
Hi,
I have some charset encoding problems of mysql.
I created a database with statement like
create table 'table1' {
...
} ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
no data at the beginning.
Then I use ROR to insert data (browser encoded with UTF-8). The charset display in browser is correct, however,
when I use mysqladmin to browse database data, the charset is wrong. (no matter I choose connection to utf-generic or latin)
in mysql client, I execute command like this
> show variables like '%character%';
character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
This is what I got.
The bad thing is, when I dump the data, and import to another host, the encoding is all wrong.
Any idea about this?