Displaying Chinese characters in MySQL
Hi,
I am trying to display chinese characters with a MySQL database, but I am running into some problems.
I am using navicat v7.2.9 to edit the database,
MySQL 4,
and PHP 5
I set up the connection to the database using UTF-8 in the connection string.
I then went to the relevant table, and set the character set to:
utf8 and the Collation to utf8_unicode_ci. (what is Collation)
I then entered the following text into the database:
不是免費的,但其他免費的有很多,它是把
It is in the “PMingLiU” font
This is what appeared in the web page (after changing the encoding in firefox to utf-8)
�?是�?費的,但其他�?費的有很多,它是把
Many characters have been stuffed up somehow.
When I go to the websites source, I get:
�是�費的,但其他�費的有很多,它是把
UTF-8 and PMingLiu are the recommended char sets and fonts for displaying Chinese characters, what is going on here?
I then got the same text, and put it into a blank html file, with the encoding as UTF-8 and it displayed fine. What settings to I need in tMySQL to make it work?