Page 1 of 1

Store Chinse character in Mysql

Posted: Fri Jan 26, 2007 11:04 am
by keenlearner
My site is 90% english, however there are some pages that i need to display in chinese character. In fact, arabic, russia, spanish. In mysql, i try to use collation utf8_general_ci . So when i input the data using phpmyadmin, i type chinese character e.g 福(lucky) into the record, save it. Unfortunately when i use php to get the data from mysql database and present it on the web, it appear as '?' (question mark). How do i show it on the web correctly ? Thank you.

Posted: Fri Jan 26, 2007 11:23 am
by Kieran Huggins
you need to specify the character encoding "UTF-8" in your web page - there's a UTF-8 tutorial on this board somewhere - do a search, it should answer all your questions.

Posted: Fri Jan 26, 2007 11:47 am
by keenlearner
Thank's for the reply. I did use utf-8 on html charset. When i use latin1, it stores Chinese character as 黑 and it's converted automatically to chinese character 黑 on the web.