Closed Bug 244330 Opened 21 years ago Closed 20 years ago

Switching to Unicode UTF-16 causes Firefox to display garbage

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: murphye, Assigned: jshin1987)

Details

(Keywords: intl)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040515 Firefox/0.8.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040515 Firefox/0.8.0+ See screenshot. Reproducible: Sometimes Steps to Reproduce: 1. Go to http://slashdot.jp 2. View -> Character Encoding -> Unicode Actual Results: See the screenshot. Whole page is rediplayed as garbage. Switching to a different character set will show the page again. Expected Results: Try to display some sort of representation of the page other than a page full of garbage characters. I do not have the Japanese fonts to display the page, could this be a trigger for this problem? The page is served up as Japanese character set.
Attached image Actual Result
At the risk of revealing my nearly total ignorance of this subject, surely if the page is encoded in EUC-JP and you ask Firefox to intepret it as UTF-8 then garbage is what should be displayed, or am I missing something? Either way this bug should probably be in the Browser product.
Yes, that is true, but just for the characters. However in this case, the whole page is lost.
Whenever I get that full page of garbage, I notice it's because the encoding became set to Unicode 16, and switching back to 8 reveals the page. I don't know how it ends up on Unicode 16. I additionally have a problem that is certainly related. When I File > New Tab I get, instead of blank page, a line of garbage. The encoding is inexplicably UTF 16 again, and switching that to 8 makes the space blank again. This sometimes even happens right before a page loads. For instance my homepage is set to google.com and when I start Firefox up, a line of garbage is displayed for a half second before Google appears.
I was not specifying that this problem is UTF-16 only. Thanks Comment #4.
Summary: Switching to UNICODE causes Firefox to display garbage → Switching to Unicode UTF-16 causes Firefox to display garbage
I don't know what I was smoking before or if the problem is worse now, but this problem seems to happen on every web page all of the time. Removing URL. Reproducible: Always Steps to Reproduce: 1. Go to a web page. 2. View -> Character Encoding -> Unicode (UTF-16 Little Endian) Also see http://bugzilla.mozilla.org/show_bug.cgi?id=171984 as that problem may be related.
> Switching to Unicode UTF-16 causes Firefox to display garbage This bug as filed is invalid. If you manually switch to UTF-16 when the actual encoding used is not, what do you expect other than the garbage? If it's about UTF-16 being automatically chosen when it should not, please change the summary line accordingly. Otherwise, this bug has to be closed as invalid. BTW, what's your default character encoding? (Is it set to UTF-16?) Did you turn on the automatic detector? Does it happen with a recent nightly build of Mozilla, too? BTW, please do not use the full URL when refering to another bug (bugzilla doesn't show the tooltip if a bug is cited with the full url). Just use the bug number preceeded by 'bug' like this: bug 171984
Assignee: firefox → jshin
Keywords: intl
Comment 2 is correct but needs some filling out. If you try to display a website in the wrong encoding, it appears as garbage to a lesser or greater extent, depending on how much the two encodings overlap. In the example of EUC-JP and UTF-8, as comment 3 says, all the japanese characters will appear as garbage but the structure of the page and any words in Latin script will still appear correctly, since the US-ASCII range is the same in both encodings. In the example of EUC-JP and UTF-16 there is no overlap at all, so you get the full page of garbage shown in the attachment. This bug is INVALID. Comment 4 seems to be about something different, maybe an autodetection issue. Update: jshin and I just midaired saying much the same thing. I think this bug should be closed anyway, and if there is a genuine bug with UTF-16 being selected when it shouldn't be (per comment 4) it should be filed separately.
Ok, that sounds like a good explanation of the reason why this is happening. However, should the application somehow notify the user the reason why the WHOLE page (layout) is garbage, rather than just the text of the page. When it happens it looks like a bad bug in the browser and the user may think so too (as I did). I have not had the UTF-16 encoding switch on by itself. Apparently the other person has. Yes that should be a separate bug.
Even when the page is written in English, just like the Mozilla bug report page, if you choose the UTF-16, it shows garbage. Confirmed with Mac version of the Firefox.
(In reply to comment #10) > Even when the page is written in English, just like the Mozilla bug report page, > if you choose the UTF-16, it shows garbage. English or not, it doesn't matter.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: