HTML元字符集不起作用 [英] HTML meta charset not working

查看:96
本文介绍了HTML元字符集不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在页面的开头,我有以下代码:

At the beginning of my page, I have the following code:

<HTML>
<head>
<meta charset="utf-8">
<title> 
//other

我使用了meta,因为我必须在网站上输入一些日语字符.在这里,您可以看到一个示例:

I used the meta because I have to put in my website some Japanese characters. Here you can see an example:

<tr>
<td><label class="blacktd" onmouseover="apriimg('imgbox', '4');"> Shy Guy Bazaar </label></td>
<td><a href="http://www.youtube.com/watch?v=kpmkZIcD7fc">2'03"007</a></td>
<td>そうめん</td> //look at here
<td><img src="http://mk7vrlist.altervista.org/flags/jp.gif" /></td>
<td>2013/06/30</td>
</tr>

我用谷歌搜索了一下,发现只需要将该标签带有charset属性即可.顺便说一下,我的网页显示的是%u305D%u3046%u3081%u3093而不是そうめん".你知道为什么吗?

I googled this and I saw that I simply need to put that tag with the charset attribute. By the way my webpage shows %u305D%u3046%u3081%u3093 instead of "そうめん". Do you know why?

推荐答案

由于以下之一:

  • 您有一个HTTP标头,该标头指定了不同的字符编码(HTTP标头优先于元元素)
  • 您尚未使用UTF-8保存文档(您只是在告诉浏览器您自己)

这篇关于HTML元字符集不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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