Results 1 to 2 of 2

Thread: character-set in mysql

  1. #1
    Join Date
    Nov 2005
    Posts
    1

    character-set in mysql

    Hi,

    Character-set thing is always complicated for me after I move back to China.

    I am using mysql4.1.2a version, all tables are using default Latin1_swedish_ci character collection.

    When I backup database using mysql, and get a plain text file which contains Chinese. But those Chinese fonts can not be read no matter what encoding I try.

    I open this plain text sql file in IE and even write my own program to read this file, I try latin1, utf8, gb2312 ... just can not read those Chinese fonts.

    But if I restore it back into database using mysql <backup.sql,
    again, it is readable in MySQL control center, but it can not be read in MySQL Query browser.

    I also created a complete new database, this time I specify utf8 as default character set for the new database, and when I dump it, I got a utf8 encoded plain text file. And MySQL Query browser can read tables with Chinese font, but MySQL control center will just display Chinese char in a unreadable fonts.

    Now I want to upgrade old Latin1_swedish_ci to utf8, how can I do it? I tried all ways I can think out, just don't work.

    And how really is this character-set thing working? And I notice mysqldump and mysql command line program both accept parameter --default-character-set, what really it does?

    I am desperate need help to solve this problem, and thanks a lot for you help!!

    Ryan

  2. #2
    Join Date
    Nov 2005
    Posts
    1
    Have a look here about upgrading your database:
    http://dev.mysql.com/doc/refman/4.1/...onversion.html

    Hope this helps,
    Grz, Jrf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •