如何在MySQL数据库表中插入法语字符? [英] How to Inserting french characters in mySQL DB table?
本文介绍了如何在MySQL数据库表中插入法语字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在mySQL DB中插入法语字符时遇到了一个主要问题.法语字符在mysql表中无法正确显示.例如,教育"显示为教育".我已将编码设置为utf8_unicode_ci.我也尝试了htmlentities($ string,ENT_QUOTES,"UTF-8")函数. 有人可以帮我吗?
I am having a major issue with inserting french characters in my mySQL DB. The french charaters doesn't display properly in the mysql table. For example "Éducation" is displayed as "Éducation". I have set the encoding to utf8_unicode_ci. I have also tried the function htmlentities($string ,ENT_QUOTES, "UTF-8"). Can someone help me with this?
推荐答案
在php中:
header ('Content-type: text/html; charset=utf-8');
连接后:
mysql_set_charset("utf8");
这篇关于如何在MySQL数据库表中插入法语字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文