Closed Bug 248179 Opened 20 years ago Closed 20 years ago

Page broken if xsl:output encoding is different from frame src encoding

Categories

(Core :: XSLT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: harunaga, Assigned: sicking)

References

()

Details

(Keywords: intl)

Attachments

(2 files)

XSLT-generated output is displayed as garbage, if XSL style sheet generates <frame> (or <iframe>, <object>) and the frame src (or embedded html) encoding is different from xsl:output encoding. testcase (XML): http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2289&amp;action=view XSL style sheet used by XML above (generates frameset, xsl:output encoding=UTF-8): http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2285&amp;action=view frame src used by the testcase (EUC-JP): http://www.mozilla.gr.jp/
just to add to this, I cross checked this with an html iframe src, in standards rendering mode. I'll attach it for the sake of completeness.
Attached patch Patch to fixSplinter Review
The nsIParser.h change is what really fixes this bug. Transformiix was setting the charsetsource so high that it overrode childframes. I thought it was safe to change the value for kCharsetFromOtherComponent since it's only used by transformiix nowadays (don't know what it was originally created for). The change to txMozillaTextOutput and txMozillaXMLOutput is to fix a separate bug where we're setting bad charsets in the result document.
Assignee: peterv → bugmail
Status: NEW → ASSIGNED
Attachment #173439 - Flags: superreview?(bzbarsky)
Attachment #173439 - Flags: review?(bzbarsky)
Comment on attachment 173439 [details] [diff] [review] Patch to fix r+sr=bzbarsky, but could you document in nsIParser that kCharsetFromParentForced and higher will force the charset on child frames too, unless they're explicitly overridden?
Attachment #173439 - Flags: superreview?(bzbarsky)
Attachment #173439 - Flags: superreview+
Attachment #173439 - Flags: review?(bzbarsky)
Attachment #173439 - Flags: review+
Checked in. I didn't include 'unless explicitly overridden' part because overrides like <meta> and httpheaders won't actually override. I wonder if the kCharsetFromPreviousLoading should be lowered too, though it doesn't look like it's used at all.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: