PHP MySQL希腊字母显示像????分数 [英] PHP MySQL Greek letters showing like ???? marks

查看:233
本文介绍了PHP MySQL希腊字母显示像????分数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表有一些文本和文本是希腊字母,当我使用sql工具和选择从这个表中的数据正确显示

I have a table with some text and text is greek letters, when i use sql tool and select the data from this table is showing correctly

但是当我显示这个我的网站前端使用mysql_fetch数组和当echo显示如下

But when i show this my site frontend using mysql_fetch array and when echo it shows as below

任何人都知道如何修复此错误
谢谢。

Anyone know how to fix this error thank you.

推荐答案

请尝试以下操作:

在连接到mysql之后,请执行此查询以确保您使用的是UTF8:

after you connect to the mysql, do this query to make sure that you are using UTF8:

mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER SET 'utf8'");

请确保在HTML(head)中使用正确的编码,请尝试:

make sure that in HTML (head) you are using the right encoding, try:

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

如果这样没有帮助,请尝试不同的编码,如ISO-8859-1

if this does not help, try different encoding, like ISO-8859-1

这篇关于PHP MySQL希腊字母显示像????分数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆