all data become ?? mark after convert from euc-jp to utf-8 $20

Discussion in 'MySQL' started by ronalds, Jan 24, 2008.

  1. #1
    I have Japanese data encoding with euc-jp and after exporting the dump file and convert from euc-jp
    to utf-8 ,imported again using phpMyAdmin.
    but all data has changed to ????? mark .


    The scripts use the server default settings, the scripts do not
    set the encoding for mysql, input or output nor the encoding
    for the user input, that is what apache on the server is set to
    use (default apache encoding).

    The structure of setting is as below for new database:
    +--------------------------+----------------------------+
    | Variable_name | Value |
    +--------------------------+----------------------------+
    | character_set_client | utf8 |
    | character_set_connection | utf8 |
    | character_set_database | utf8 |
    | character_set_results | utf8 |
    | character_set_server | latin1 |
    | character_set_system | utf8 |
    | character_sets_dir | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+

    before was as below :
    mysql char set : latin1_swedish_ci
    collation : ujis_japanese_ci

    any help and assistance would be appreciated.
    Ronalds
     
    ronalds, Jan 24, 2008 IP
  2. sharqi

    sharqi Guest

    Messages:
    105
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    http://dev.mysql.com/doc/refman/5.0/en/charset-collate.html

    I used on the fly collation when working with several large Korean databases that had different collation (sometimes 3 or 4 differences in the same database spread over hundreds of tables was a complete pain in the bum).

    I am unsure why you have exported and imported the data. If you wish to convert it it can be all done via SQL itself.
     
    sharqi, Jan 24, 2008 IP
  3. ronalds

    ronalds Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your response.
    actualy i am newbie to all these things and had to do test my system in a different directory so I export ,import just to make sure that my tables and data not scrambled.
    I am sure there are alot of way to do that but not for me.
    Regards
     
    ronalds, Jan 24, 2008 IP