Sign in to follow this  

MySQL Database - Chinese character problem

Recommended Posts

+chconline    158

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?

Share this post


Link to post
Share on other sites
+chconline    158

Thanks. Didn't work though :S

Share this post


Link to post
Share on other sites
The_Decryptor    1,105

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.