Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2004
    Posts
    2

    Red face Unanswered: Unicode in MySQL

    Hi,

    i am a beginner of Unicode and My SQL.
    I was required to convert an existing website to a chinese version website.

    i have no idea how the unicode data store in MySQL database and how they will be retrieved and displayed.

    can any one give me some idea and show me the way?

    thank you in advanced.
    any help will be appreciated.

  2. #2
    Join Date
    Jul 2004
    Location
    Dundee, Scotland
    Posts
    107
    From version 4.1 MySQL supports unicode (UTF-8).

    Prior to MySQL version 4.1 it was not possible to store unicode text in the database.

    Back in August 2003 version 4.1 had not been realased officially yet so I wrote the following article which describes an alternative approach:

    http://www.yellowmarker.co.uk/index....html_php_mysql

  3. #3
    Join Date
    Dec 2004
    Posts
    2

    Red face Unicode in MySQL

    Hi Matthew,

    thanks a lot for the infomation given.

    By the way, if i key in chinese character using "QuanPin" IME, those chinese characters must be encoded to UTF-8 before they are store in database? or is there any way of keying in chinese characters that are already in the unicode form?

    After the data is retrieved from the database, again it will be decoded?

    I have some confusion here, if i choose to use unicode, can the browser display chinese simpified or chinese traditional as well?

    thank you again.

    Regards,
    Angelina

  4. #4
    Join Date
    Jul 2004
    Location
    Dundee, Scotland
    Posts
    107
    re " if i key in chinese character using "QuanPin" IME, those chinese characters must be encoded to UTF-8 before they are store in database? or is there any way of keying in chinese characters that are already in the unicode form?"
    ... question: please state which version of the MySQL database is available.
    ... perhaps "QuanPin" IME is based on unicode?
    ... with MySQL you can define the characterset of the database. what is it currently set to? if you do a small/quick test using web form to input text / insert into database / retreive from databse / display on webpage, what is the outcome?

    re "After the data is retrieved from the database, again it will be decoded? "
    ... web browsers can decode and display UTF-8 / unicode automatically
    ... the browser can display most character sets. further you can tell it what the web page contains using <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> in the HTML head section.
    ... chinese simpified / chinese traditional is something that I have little experience with, coming from the UK, except to say that the web browser should prompt the users to download and install and character sets they need to view a webpage.

    re "if i choose to use unicode, can the browser display chinese simpified or chinese traditional as well?"
    ... as above

    Angelina, I don't have a complete answer for you. I have some experience of displaying text in different languages on webpages, and no experience of entering text via the web browser which uses eastern character sets.

Posting Permissions

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