Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2007
    Location
    Bedfordshire, UK
    Posts
    64

    Unanswered: Chinese characters showing as question marks

    I'm reasonably au fait with Access, but MySql is a mystery to me, so I'm not even sure I'm asking the right questions here!
    A friend of mine runs an art website and sells artworks on it. She is French, living in the UK, but a lot of her client base is in China. Because of this, the MySQL database which sits behind the website was set up by some Chinese students which her partner found somewhere (not sure how this came about, to be honest!) Anyway, her problem is that the English language part of the system works fine, but on the Chinese part any names and addresses entered using Chinese characters end up as question marks in the database. I gather the said Chinese students aren't able to solve this issue. She has asked my advice as she knows I work with databases, but beyond my initial thought that it's something to do with the possibility that Chinese fonts are not being supported in MySQL, I'm not sure where to go next.
    Any suggestions or advice would be gladly received! Thanks.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    check the character set of the database, the website.
    make sure that both can support the Chinese character sets and any other languages

  3. #3
    Join Date
    Mar 2007
    Location
    Bedfordshire, UK
    Posts
    64
    Quote Originally Posted by healdem
    check the character set of the database, the website.
    make sure that both can support the Chinese character sets and any other languages
    OK - I'll see if I can find that out, thanks.

  4. #4
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    I believe charsets might well be your answer. The default for most installed versions of mySQL is to have charset latin1 and collation latin1_general_ci . Basically meaning any characters outside the normal latin1 get truncated. So you're going to have a problem in that chinese characters that have ALREADY been inserted into the database cannot be converted back out (because of the truncation). I believe the charset you'll need is binary (or UTF-8 anyone?). This will maintain the exact digit that represents the characters they're using. Then the next step is to use the right charset when you output in the browser. This will depend on the particular language orientation of the user.

  5. #5
    Join Date
    Mar 2007
    Location
    Bedfordshire, UK
    Posts
    64
    Thanks aschk, you're spot on. Problem solved!

Posting Permissions

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