chejnik
chejnik

Reputation: 229

Tab in Firefox shows improper charset while loading

While loading the content, Firefox (in Ubuntu, Windows, MacOs) shows for a second improper charset (namely Czech letters). When the content is loaded, it shows a proper charset. Safari, Explorer, Opera shows tab when loading correctly.

Html head is

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="shortcut icon" href="favicon.ico">
<title><?=$lang_header_dict;?></title>
<meta name="description" content="<?=$lang_head_description?>">
<meta name="keywords" content="<?=$lang_head_content?>">
<meta name="author" content="<?=$lang_head_author?>">
<meta http-equiv="X-UA-Compatible" content="IE=7">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" title="hvalur" href="style.css">   
<script type="text/javascript"> 
function setfocus() {
document.form1.search_string.focus();
}
function popitup(url) {
newwindow=window.open(url,'name','height=400,width=800, scrollbars=yes');
if (window.focus) {newwindow.focus()}
return false;
}
</script>
</head>

Title contains Czech national characaters.

Upvotes: 1

Views: 304

Answers (2)

newB
newB

Reputation: 11

Even with the meta line before the title line, your page's charset may be overridden by Apache's default charset. This is by design.

To solve this issue, add the following to your config file:

AddDefaultCharset Off

See: http://padawan.info/en/2004/07/debugging-chars.html

Upvotes: 1

chejnik
chejnik

Reputation: 229

Placing meta tag

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

before

<title><?=$lang_header_dict;?></title>

shows correct charset and national characters.

Upvotes: 0

Related Questions