Loading an HTML file from disk using a specific encoding?

Georgios Petasis <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpfe
Organization http://groups.google.com
Message-ID <[email protected]>
Hi all,

I have a XUL app that process some HTML files I have stored locally on
disk, loading them with browser.loadURI().

Is there a way I can define a default encoding when loading the file?

I have a few files, that I have encoded in utf-8, and they do not
contain a content-type declaration (specifying a charset). Opening
them with firefox, correctly detects that they are utf-8 files, but
doing the same in XulRunner (firefox -app), does not.

I have tried to set the charset in browser.loadURI(), but it has no
effect.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.