Characters on page coming out as question marks, despite charset="utf-8"
Someone was kind enough to do a Czech translation for our website, but the special characters come out as questions marks, example:
This is the text meant to be showing in the black bar:
Internet Explorer a Safari by mìli podporovat Ogg Vorbis audio. Dejme jim to na vìdomí!
The page is HTML5, and here is the header:
<!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'开发者_StackOverflow>
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
We are using a google web font, but I tried changing it to Arial but no luck, still lots of question marks. I was under the assumption the UTF-8 should allow me to use special chars?
You could try
<meta charset="ISO-8859-1" />
You should go with UTF-8, not ISO-8859-1.
Did you look at your database tables and db connection settings? You Table Collation should be set to utf8_general_ci
, and when you establish your connection you must run a mysql_set_charset('utf8');
right after you're connected.
Also, make sure your http-header set to
Content-Type: text/html; charset=UTF-8
on your webserver.
(Edit: this applies to php/mysql; not sure what system you are running...)
You can try
also you can try it on javascript tag like this
<script src="test.js" charset="iso-8859-1"></script>
to fix the questions marks charset error on any javascript popups
精彩评论