On Mon, 24 Mar 2008 18:58:36 +0000, Jeremy Nicoll - netsurf
<jn.ml.nso.71(a)wingsandbeaks.org.uk> wrote:
Paul Vigay <lists-nospam(a)vigay.com> wrote:
> Oddly, saving the source code to hard disc and then double-clicking on
> it, views perfectly ok....
Is that odd? I might be wrong, but I seem to remember that when you
"save
the source code" what's being saved isn't the incoming
raw data stream as
it arrived from the http server, but instead some intermediate form that
NS
has transformed it into. OTOH, even if that's right, maybe you
would
expect
it to work the same way.
That rather depends upon how you save it. If you just save the source, then
it'll be the exact same data as sent by the server. If, however, you've
done a full save, then it won't be (as the URLs for embedded objects will
have been rewritten).
In this particular case, it's simply that the server sends a Content-Type
header containing "text/html; charset=UTF-8", and the document contains
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">.
The HTTP header wins, but the document isn't UTF-8 encoded. In certain
circumstances, this results in the HTML parser breaking. When loaded from
disc, there's no HTTP header, so the meta charset is used.
John.