The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL Charset Encoding

Discussion in 'General Discussion' started by JBapt, May 24, 2004.

  1. JBapt

    JBapt Active Member

    Joined:
    Feb 5, 2004
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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
     
    #1 JBapt, May 24, 2004
    Last edited: May 24, 2004
  2. brodock

    brodock Registered

    Joined:
    Jul 19, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
    #2 brodock, Jul 19, 2005
    Last edited: Jul 19, 2005
  3. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Add

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

    brodock Registered

    Joined:
    Jul 19, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  5. vivek

    vivek Well-Known Member

    Joined:
    Mar 2, 2004
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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 :)
     
Loading...

Share This Page