Data with Chinese character return?

I am using php to connect myphpadmin. However, since the result contains chinese characters, when I display it on website. The character becomes ??? instead.

May I know how can I solve this problem? OR
This is the limitation on infinity free free hosting?

Hello there,

Try using the following chinese character set (charset):

  1. big5 | Big5 Traditional Chinese
  2. gb2312 | GB2312 Simplified Chinese
  3. gbk | GBK Simplified Chinese

I have checked the above charsets and they are available here.

To change your MySQL Database Charset, Go to phpMyAdmin and then Go to General Setting where you can change what charset that you wanted to use.

Or if you want to change the charset in a specific database, then go to phpMyAdmin and Choose the database that you want to configure and then go to the Operations tab, you can see the option to change your charset there for your specific database.

Hope this helps!

2 Likes

phpMyAdmin has some issues displaying non latin characters. So viewing and entering such data may not work properly.

1 Like

HI UnknownLolz,
I have tried to update the collation, but it looks the same result. I think that this is the limitation of infinity free? OR you have made it work before?

Thanks.

What type of site are you hosting here?
Is it only a static HTML file? Or you’re using some CMS like WordPress?

Hi UnknownLolz,
Thanks for your reply again. It is a online store site which host product list. It write with html and php.
Currently, I am using php to retrieve mysql data and using jquery to modify the html content. However, it is found that the return data become ??? if the data include chinese characters.

I have tried below to solve the problem.

  1. Add
  2. Change the collation in phpadmin

BTW, the chinese character show correctly if it hardcode in html content.

Thanks.

If your site’s front end is using html then it might be worth it to insert this inside your header tag <head>:

<meta charset="utf-8">

Or if that doesn’t work you can use this:

<meta charset="big5">

You can also use either of these 2 if you don’t like big5 (Traditional Chinese):

  • gb2312 (Simplified Chinese)
  • gbk (Simplified Chinese)