& nbsp;显示不正确 [英]   not being displayed properly

查看:115
本文介绍了& nbsp;显示不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网页中显示 时遇到问题,在PHP中使用utf8_decode()后,它显示为.

I am having problem in displaying the   in my web page, after using utf8_decode() in PHP it gets displayed as �.

我一直在使用

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

我刚刚注意到,所有其他特殊字符(例如®,™等)也不起作用.

I just noticed, all the other special characters, like ® , ™ etc are also not working.

推荐答案

请确保已在HTML文档的标记中指定了UTF-8编码:

Be sure that you've specified UTF-8 encoding in your HTML document's tag:

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

这篇关于&amp; nbsp;显示不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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