Netscape not reognizing UTF-8

liunx

Guest
I am new to web page creation. I have been developing my first web pages using strict xhtml 1.0 and UTF-8 encoding. I have been using Internet Explorer 6.0 to display my pages, but just installed Netscape 7.1. IE displays the pages as intended, but when I try to do so with Netscape, it insists on displaying only the first three (binary) bytes at the beginning of an UTF-8 encoded file, and nothing else. I realize that manually selecting UTF-8 encoding causes the display to be correct, but I certainly don't want the people viewng my pages to have to do that! I have spent hours searching for information on the internet and playing with DOCTYPE, ?xml and meta tag statements, with no progress.<br />
Can anyone help?<!--content-->Here's a meta tag for UTF-8 encoding:<br />
<br />
<meta http-equiv="content-type" content="text/html; charset=utf-8" /><br />
<br />
But of course what you could do is save your source as windows-1252 and have this on your page, (if you use XP then choose ANSI from the dropdown list, in other windows operating systems notepad automatically saves as windows-1252):<br />
<br />
<meta http-equiv="content-type" content="text/html; charset=windows-1252" /><br />
<br />
I suggest saving in windows-1252, UTF-8 is only really for if you have used any not standard european characters. Older browsers simply won't understand UTF-8 and therefore will display some hideous things, Netscape 4.79 is a typical example of this.<!--content-->I have tried the meta tag you give for UTF-8, but it doesn't make any difference. I'll have to eventually use chinese characters in my web pages, so I'd like to stick with UTF-8 if possible. It just seems that Netscape insists on stopping after encountering the first three bytes - not looking any further. As soon as I manually tell it that the encoding is UTF-8, everything is fine.<!--content-->I have got Netscape 7.10 so if you provide a link to your page or upload your source I could take a look at it to try and spot a potential problem.<br />
<br />
Before we try that though, I must ask, do you have a doctype decleration on your page to "force" the browser into standards mode rather than staying in quirks mode.<br />
If you don't know what a dcotype is there's a list of them here (<!-- m --><a class="postlink" href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">http://www.w3.org/QA/2002/04/valid-dtd-list.html</a><!-- m -->).<!--content-->In preparing a sample html file to attach, I have discovered something unexpected: If I open my html files directly using Netscape (File -> Open File), they display fine, but if I go through my web server using a URL, they do not! The web server must be rendering the first three bytes somehow. (Internet Explorer displays as expected when using my web server, so perhaps it is ignoring these bytes.) I am using an Apache 2.0.47 web server running on Redhat Linux 7.3. Maybe the problem is the web server. Perhaps this should be in a different forum now?<!--content-->I think so, try posting in the PHP forum. My knowledge of PHP and Apache is limited to 0.<!--content-->will do. thanks for your help!<!--content-->I assume you do know Netscape has been discontinued in favour of Mozilla.<br />
<br />
You should save the file as plain ASCII/ANSI and not UTF and serve it as UTF-8 via the XML declaration or content-type a link to your page might be useful since Netscape 7.x understands UTF-8.<!--content-->
 
Back
Top