Firefox bug: The history database is endian-specific
Introduction
This page demonstrates the endian-problems in Firefox's history database.
What's Wrong
The bug is that Firefox records and displays website titles in an endian-dependent
fashion. If a user only ever uses one platform, they'll never notice.
If the user changes between big-endian and little-endian machines,
their history file will be filled half with big-endian titles and half with
little-endian titles, and will not display properly on either
platform.
The bug is particularly noticeable when typing URLs into the location bar,
because the autocompletion window that pops up will be full of random chinese
characters where web site titles should be. For example, compare these two
screenshots, one taken on a little-endian machine, the other on a big-endian
machine:
Firefox's URL bar, viewed on a little-endian machine:
Firefox's URL bar, viewed on a big-endian machine.
How to reproduce:
-
Run Firefox on a little-endian machine, like an Intel PC running
Linux. Visit some pages, such as:
http://web.mit.edu.ezproxyberklee.flo.org/jmorzins/www/mozilla/little-endian.html
-
Quit Firefox (to save your history).
-
Run Firefox on a big-endian machine, like a Sun SunBlade running
Solaris. Visit some pages, such as:
http://web.mit.edu.ezproxyberklee.flo.org/jmorzins/www/mozilla/big-endian.html
-
Quit Firefox (to save your history).
-
Now restart Firefox. Notice that:
- if you type URLs into the location bar, the pop-up autocompletion
menu has garbled (Chinese!) titles for other-endian platforms
-
if you view your history, the list of titles in the history has
garbled (Chinese!) titles for other-endian platforms.
What should have happened
Firefox should either store titles in an endian-independent
fashion, or should use the unicode Byte Order Mark (U+FEFF)
to label (and detect) the endian-ness of each title string.
Any other information?
I submitted this bug against Mozilla nearly three years
ago - bug
108134. It was fixed in Mozilla about a year ago.
Apparently it hasn't yet been fixed in Firefox.