• 0

MySQL Database - Chinese character problem


Question

I have a website that has some Chinese characters in it. When I exported the MySQL database backup, everything shows up as garbage. From what I've read online, it's because the original encoding was set as 'latin1' when I'm supposed to use 'utf8'. However, on the front end (Like accessed from web browser), the text on the site shows up just fine.

 

Is there any way I can fix the MySQL database backup to show Chinese characters properly instead of garbage?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Latin1 can't store Chinese characters, so if it ever worked before it was on accident. Try taking just the "garbage" from the SQL dump and (in a web browser or good text editor) try changing the encoding scheme until it works, then you'll know what format it was originally in.

Another thing is that "utf8" in MySQL isn't actually proper UTF-8 support, it's broken. You should use "utf8mb4" if you can.

  • Like 1
Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.