I have a small javascript snippet that does the following:
Expand|Select|Wrap|Line Numbers
- // an entire html document is in here
- data = "\u003c!DOCTYPE html PUBLIC \u0022-//W3C//DTD XHTML 1.1 Strict//EN\u0022\n ....";
- newwin = window.open("", "outputwin", "");
- newwin.document.write(data);
- newwin.document.close();
When I look at the character encoding in the Firefox (2.0.0.3) "View Page Info" dialogue box, it tells me the following:
The original page has an Encoding of UTF-8 and the Content-type is text/html; charset=utf-8
The new page, however, has an Encoding of ISO-8859-1 but the Content-type is shown as text/html; charset=utf-8.
This is the case when there are non-ISO-8895-1 characters present although they are correctly displayed.
So...
* Is this something to be worried about?
* Is this something I can address in the javascript? (is there an optional argument to document.open that specifies the charset? I can't find one!)
* Is this instead a Firefox bug?
All thoughts and ideas appreciated.