Closed Bug 240321 Opened 21 years ago Closed 21 years ago

XHTML Documents should default to UTF-8 and not look at the "default" charset

Categories

(Core :: DOM: Core & HTML, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bc, Assigned: jst)

References

()

Details

(Keywords: fixed1.7)

Attachments

(4 files)

When UTF-8 document is served as HTML, multibyte characters are display correctly if charset autodetection is turned off however if the document is served as XHTML then the document is incorrectly assumed to be iso-8859-1.
Attached file HTML test case
Attached file XHTML test case
bz says <quote>It's a bug in nsHTMLDocument::StartDocumentLoad -- for XHTML documents it needs to do the same thing as nsXMLDocument::StartDocumentLoad does -- default to UTF-8 and not look at the "default charset".</quote>
Assignee: general → jst
Status: NEW → ASSIGNED
Attachment #146033 - Flags: superreview?(bzbarsky)
Attachment #146033 - Flags: review?(bzbarsky)
Comment on attachment 146033 [details] [diff] [review] diff -w of the above for review. r+sr=bzbarsky
Attachment #146033 - Flags: superreview?(bzbarsky)
Attachment #146033 - Flags: superreview+
Attachment #146033 - Flags: review?(bzbarsky)
Attachment #146033 - Flags: review+
Is this something that is appropriate for 1.7? I guess that XHTML served as application/xhtml+xml in UTF8 is not that common but ...
Comment on attachment 146033 [details] [diff] [review] diff -w of the above for review. I absolutely think we should land this in 1.7 -- it's a trivial patch and could become a much bigger liability a year out.
Attachment #146033 - Flags: approval1.7?
Fix checked in on the trunk.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Keywords: fixed1.7
*** Bug 243865 has been marked as a duplicate of this bug. ***
Component: DOM: HTML → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: