页面上的字符作为问号出现,尽管charset =“utf-8”

时间:2011-08-02 20:36:46

标签: html5 character-encoding

有人对我们网站的捷克语翻译非常友好,但特殊字符作为问号出现,例如:

enter image description here

这是要在黑条中显示的文字:

  

Internet Explorer是一款由mìlipodporovat提供的Safari Ogg Vorbis音频。 Dejme jim tonavìdomí!

页面是HTML5,这是标题:

<!DOCTYPE html>

<html lang="cs">

<head>
    <meta charset="UTF-8" />
    <link rel="stylesheet" href="default.css" />    
    <meta name="description" content="HTML5 audio is a bit of a mess.  It would be easiest if Internet Explorer and Safari supported the high quality Ogg Vorbis format which would be free for everyone to use." />
    <link href="http://www.wewantogg.com" rel="canonical" />
    <title>Ogg Vorbis Support for Internet Explorer and Safari</title>
    <link href='http://fonts.googleapis.com/css?family=Quattrocento+Sans' rel='stylesheet' type='text/css'>
    <link rel="shortcut icon" href="favicon.ico" />
</head>

<body>

我们正在使用谷歌网络字体,但我尝试将其更改为Arial,但没有运气,仍然有很多问号。我假设UTF-8应该允许我使用特殊字符?

3 个答案:

答案 0 :(得分:4)

你可以尝试

<meta charset="ISO-8859-1" />

答案 1 :(得分:4)

你应该使用UTF-8,而不是ISO-8859-1。

您是否查看了数据库表和数据库连接设置?您的表格整理应设置为utf8_general_ci,并且在建立连接后,您必须在连接后立即运行mysql_set_charset('utf8');。 另外,请确保将http-header设置为

Content-Type: text/html; charset=UTF-8

在您的网络服务器上。

(编辑:这适用于php / mysql;不确定你正在运行什么系统......)

答案 2 :(得分:1)

你可以尝试

你也可以在像这样的javascript标签上试试

<script src="test.js" charset="iso-8859-1"></script>

修复问题标记任何javascript弹出窗口上的charset错误