JBapt

Active Member
Feb 5, 2004
41
0
156
Porto - Portugal
MySQL, tar or gzip Charset Encoding

Hi

when i try to restore the backup of mysql tables i get the content of the tables with a wrong charset. I use Portuguese charset and when i restore the tables, all the portuguese ponctuation is gone and replaced by wrong characters.

I did a dump of the tables and the content was correct. Then "tared" the dump file like WHM backup does and the punctuation was gone.

Any ideas on how to solve this? Any method i can force tar and gzip to maintain charsets? Hope i explained my problem correctly. LOOL


Thks for all
Joao
 
Last edited:

brodock

Registered
Jul 19, 2005
3
0
151
i have a similar problem... i upgraded mysql to 4.1 and when i try to access old tables named using our charset (for example: funcionários) it says it's an unknow UTF8 charset.

Any idea?
 
Last edited:

casey

Well-Known Member
Jan 17, 2003
2,303
0
191
Add

Code:
[mysqldump]
default-character-set=binary
to my.cnf and try the dump again.
 

brodock

Registered
Jul 19, 2005
3
0
151
i found the problem...
everything is set to latin1 but it seens that phpMyAdmin only uses utf-8 with MySQL 4.1 (that's the anwer i get on their forums).

thanks for all
 

vivek

Well-Known Member
Mar 2, 2004
93
0
156
India
Hello, :p

Charset problems occurs because of compability of mysql version, it is not concern with any latin1. Backup is taken in higer version i.e mysql 4.1* and uploaded to lower version i.e mysql 4.0.24* , so it doenst match. At this time you have to take mysql backup compatible with lower version i.e 4.0* , you can use this command to take dump of database :
mysqldump --compatible=mysql40 DBNAME > DBNAME.sql

Let us know if you have better suggestion, it will appriceated.

Enjoy :D

Vivek :)