Closed Bug 21429 Opened 25 years ago Closed 25 years ago

Default charset is not persistence across section

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ftang, Assigned: pollmann)

References

Details

Attachments

(2 files)

This is one of the root problem of bug 21234 and 20315
It is simpler to reproduce than 21234 and 20315

Way to reproduce
1. Go to http://bugzilla.mozilla.org/showattachment.cgi?attach_id=3374
2. Switch "view:default charset" to "Big5"
it will switch to Big5 and display correctly
3. click reload or visit other pages
The default charset is no longer "Big5"

What happen is the following. Origionally, we keep default charset in
nsWebShell.
and nsHTMLDocument::StartDocumentLoad will as webShell af it.
Now buster move it to DocumentViewerImpl, howerver, when
nsHTMLDocument::StartDocumentLoad call GetDefaultDocumentCharset, the
nsWebShell have not transfer the data to the newly created DocumentViewerImpl
yet (in Embedded). Therefore, the nsHTMLDocument::StartDocumentLoad will always
get the "ISO-8859-1"
Blocks: 20315, 21234
Attached patch debug patch1Splinter Review
Attached patch debug patch 2Splinter Review
after you apply these debug patch, try the following
1. visit
2. swtich encoding to "Big5"
3. click "Reload"

Here is what I got
From default charset, charset = ISO-8859-1
set to parser charset = ISO-8859-1 source 2
Document http://bugzilla.mozilla.org/showattachment.cgi?attach_id=3374 loaded
successfully
Document: Done (1.872 secs)
From default charset, charset = Big5
set to parser charset = Big5 source 2
Document http://bugzilla.mozilla.org/showattachment.cgi?attach_id=3374 loaded
successfully
Document: Done (1.462 secs)
Going to reload
From default charset, charset = ISO-8859-1
set to parser charset = ISO-8859-1 source 2
Document http://bugzilla.mozilla.org/showattachment.cgi?attach_id=3374 loaded
successfully
Document: Done (1.484 secs)

Notice the 3rd load, the "From default charset, charset = ISO-8859-1", which
cause "set to parser charset = ISO-8859-1 source 2"
Assignee: buster → jfrancis
Joe -- does this belong to you, or should it go to buster?
beppe - I'm unfamilar with the issues here.  I _think_ buster knows about this
stuff.
Assignee: jfrancis → buster
reassign this to buster.
beppe- the reason I create this bug and assign to buster is because he ask me to
do so from the phone call. It require change the relationship/embedded time
between DocumentViewer and nsWebShell to fix it. So... please keep this to buster
unless he tell you other reason.
See bug 20315 for a fix.  Needs reviewed.  :)
Assignee: buster → pollmann
eric has this problem nailed.  reassigning to him so he can mark it fixed.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Just checked in the fix.
*** Bug 21635 has been marked as a duplicate of this bug. ***
Status: RESOLVED → VERIFIED
I verified this in 121608 Win32 under Win95J, Win98J, and Winnt 4.0J, and
121612 Linux and Mac build.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: