在文本中显示的问号字符,为什么是这样? [英] Question mark characters displaying within text, why is this?

查看:224
本文介绍了在文本中显示的问号字符,为什么是这样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个备份伺服器,可自动备份我的现场网站,包括档案和资料库。



在现场网站上,文字看起来不错,它的镜像版本,它在一些文本中显示?。此文本存储在新闻数据库表中。



这是一个屏幕截图,显示它在活动服务器上和在镜像服务器上。



在将其备份到镜像服务器的过程中会发生什么?

解决方案

以下文章将有用



http://dev.mysql.com/doc/refman/5.0/en/charset-syntax.html



http://dev.mysql.com/ doc / refman / 5.0 / en / charset-connection.html



连接到数据库后,发出以下命令:



SET NAMES'utf8';



确保您的网页也使用UTF-8编码:



< meta http-equiv =Content-Typecontent =text / html; charset = UTF-8/> p>

PHP还提供了几个可用于转换的函数:



http://us3.php.net/manual/en/function.iconv.php



http://us.php.net/mb_convert_encoding


I have a backup server that automatically backs up my live site, both files and database.

On the live site, the text looks fine, but when you view the mirrored version of it, it displays '?' within some of the text. This text is stored within the news database table.

Here is a screen shot of it being on the live server and of it on the mirrored server.

What could happen within the process of backing it up to the mirrored server?

解决方案

The following articles will be useful

http://dev.mysql.com/doc/refman/5.0/en/charset-syntax.html

http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html

After you connect to the database issue the following command:

SET NAMES 'utf8';

Ensure that your web page also uses the UTF-8 encoding:

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

PHP also offers several function that will be useful for conversions:

http://us3.php.net/manual/en/function.iconv.php

http://us.php.net/mb_convert_encoding

这篇关于在文本中显示的问号字符,为什么是这样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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