# need help with mysql and iso/latin encoding



## nORKy (Mar 6, 2012)

Hi,

I imported a database from an old mysql server (iso/latin encoding) to a new mysql server (mariadb), but data are utf-8 encoded.

How can I import into iso/latin encoding? I can't change the App encoding.

Thank you.


----------



## Beeblebrox (Mar 6, 2012)

AFAIK, you can't change encoding once imported (or at least it won't give nice results). You need to import with the correct encoding, and the command line is preferable for this. Something like:
`# mysql -uUSERNAME -pPASSWORD --default-character-set=maria YOUR_DB < your-db.sql`
The imported DB is utf-8 encoding because that's the universally default setting on your mysql-server (--default-character-set defaults to utf-8 unless you specify otherwise).
- Double-check and BE SURE of the name of the new encoding you want.
- It's actually better if you can do a clean export (mysqldump) from your old db with the desired char-set, then imported with the desired char-set. Minimizes conversion error likelihood.


----------



## nORKy (Mar 6, 2012)

*I*n your exemple, 'maria' is a character-set?


----------



## Beeblebrox (Mar 6, 2012)

Yes, "maria" is the char-set from your "mariadb"


----------



## nORKy (Mar 7, 2012)

It's doesn't work (It's a flash App), and I can see some Ã‚Â©

I do an export:

```
mysqldump -uroot -p'pwd' --default-character-set=latin1 my_bdd > my_bdd.sql
```

And import:

```
mysql -u'root' -p'pwd' --default-character-set=latin1 my_bdd < my_bdd.sql
```


----------

