Sign in to follow this  
Followers 0

MySQL Database - Chinese character problem

4 posts in this topic

Posted

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

Posted

Thanks. Didn't work though :s

Share this post


Link to post
Share on other sites

Posted

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.

1 person likes this

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  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.