When Firefox opens an HTML page it determines the file's encoding from either its HTTP header or a META tag like this one.
<meta http-equiv="content-type" content="text/html; charset=us-ascii">
When Firefox opens local text files however no HTTP headers or META tags are available. Instead it appears to assume the file is encoded in the system's active ANSI code page unless a BOM character exists to indicate otherwise. For all other cases the encoding can be specified manually using the
View / Character Encoding
menu item.
The following chart lists test results observed using various file encodings (Firefox 3.0.15 tested).
Encoding | Byte Order Mark | Test Data | Without
View / Character Encoding |
With
View / Character Encoding |
Firefox Character Encoding Selected |
---|---|---|---|---|---|
cp850 | abc-àèìòù© | Fail | Pass | Western (IBM-850) | |
windows-1252 | abc-àèìòù© | Pass | Pass | ||
UTF-8 | abc-àèìòù©-뮻뮼뮽 | Fail | Pass | Unicode (UTF-8) | |
UTF-8 | UTF-8 BOM | abc-àèìòù©-뮻뮼뮽 | Pass | Pass | |
UTF-16LE | abc-àèìòù©-뮻뮼뮽 | Fail | Pass | Unicode (UTF-16 Little Endian) | |
UTF-16 | LE | abc-àèìòù©-뮻뮼뮽 | Pass | Pass | |
UTF-16BE | abc-àèìòù©-뮻뮼뮽 | Fail | Pass | Unicode (UTF-16 Big Endian) | |
UTF-16 | BE | abc-àèìòù©-뮻뮼뮽 | Pass | Pass |