charset troubles

Discussion in 'MySQL' started by pedrotuga, May 26, 2006.

  1. #1
    I have this database that i want to move to other server

    i dumped it to a .sql file, i can open it with any text reader like notepad++ ( windows ) and evey character looks ok...
    the database is in portuguese and so some are special characteres... they all look ok, but when i upload the file to the server those chars get al messed up.

    i edited the file with pico and there they are.. all messed up...

    i try upload via ftp using binary mode... but it didnt solve anything...

    any ideas on how to fix this?

    the file is too big to load on phpmyadmin
     
    pedrotuga, May 26, 2006 IP
  2. Dan Grossman

    Dan Grossman Peon

    Messages:
    177
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Make sure the encoding is set the same on the database, the connection from the client, and on the tables (MySQL 4.1+) as the source encoding. All have to match up or there will be corruption.
     
    Dan Grossman, May 28, 2006 IP
  3. pedrotuga

    pedrotuga Peon

    Messages:
    162
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    everything were mached. but someway the text file had a diferent seting. "ascii as ansi" or something.

    i solved it by creating a blank text file on my local machine and copy-paste the text.

    what the heck.... where do i define a textfile enconding?
     
    pedrotuga, May 30, 2006 IP
  4. Mystique

    Mystique Well-Known Member

    Messages:
    2,579
    Likes Received:
    94
    Best Answers:
    2
    Trophy Points:
    195
    #4
    error-proof: use an old phpMyadmin version to import/export your database.

    The newer the version, the fancier, buggy and plenty of annoying iframes, javascript errors, etc. etc.

    No to mention that (IMO) useless charset function

    in addition, if the file is too big use this script to perform the task: BigDump http://www.ozerov.de/bigdump.php
     
    Mystique, May 31, 2006 IP
  5. pedrotuga

    pedrotuga Peon

    Messages:
    162
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    from now on i will use the command line mysql dump tool.
     
    pedrotuga, Jun 1, 2006 IP