views:

375

answers:

1

How do you keep the special characters when you run mysqldump?

On the database it appears correctly when i do a query. But on the file after i export, all special characters look like this:

'R. António  Lt1, 1º Dtº'
+2  A: 

Use the correct character set by either setting it in your editor or (better) force one you like (such as UTF8) on dumping (this also helps avoiding all those problems moving database dumps across servers).

mysqldump --default-character-set=UTF8

Energiequant