Bug 18110

Summary: xml document with x-mac-hebrew reports empty document?
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: XMLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, annevk, ap
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
test case none

Eric Seidel (no email)
Reported 2008-03-26 09:30:12 PDT
xml document with x-mac-hebrew reports empty document? I'm probably doing something wrong... See test case.
Attachments
test case (227 bytes, application/xml)
2008-03-26 09:32 PDT, Eric Seidel (no email)
no flags
Eric Seidel (no email)
Comment 1 2008-03-26 09:32:49 PDT
Created attachment 20082 [details] test case
Eric Seidel (no email)
Comment 2 2008-03-26 09:33:35 PDT
If you remove the <?xml declaration then the document loads just fine.
Alexey Proskuryakov
Comment 3 2008-03-27 13:52:01 PDT
<rdar://problem/3977880> This is a tricky bug, and we are not aware of any actual sites that use this encoding (not counting test pages as real).
Alexey Proskuryakov
Comment 4 2008-03-28 02:42:34 PDT
I guess some more explanation is required :) See item 2 and the following item 1 of <ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/APPLE/HEBREW.TXT> - MacHebrew has '<' as an LTR character, which cannot be mapped to any single Unicode one, which is why decoding to UTF-16 inserts a direction override. The override rightfully confuses the parser, so this is really broken by design.
Ahmad Saleem
Comment 5 2023-09-20 18:02:39 PDT
Both Chrome Canary 119 and Safari 16.6, we get following: >> error on line 1 at column 44: Unsupported encoding x-mac-hebrew Do we need anything to do here?
Anne van Kesteren
Comment 6 2023-09-21 03:00:38 PDT
We're not going to support x-mac-hebrew on the web, however, there is a larger question here with what should happen with unknown encodings in XML. It doesn't appear to be specified in the XML specification. Chromium and WebKit agree on treating them as a fatal error, but Gecko renders the document. Minimal test: data:text/xml,<?xml%20version="1.0"%20encoding="a"?><b/> If at some point we decide to look at XML again maybe it's worth sorting this out.
Alexey Proskuryakov
Comment 7 2023-09-21 08:39:32 PDT
I think that unknown encoding should probably be tracked as a separate bug. This one was very specifically about x-mac-hebrew when it was supported. What I'm not sure about is whether we have completely removed the support, or if it remains available in some circumstances, such as native apps perhaps.
Anne van Kesteren
Comment 8 2023-09-21 09:34:50 PDT
Renaming back and closing as it's no longer supported per Source/WebCore/PAL/pal/text/TextCodecICU.cpp.
Note You need to log in before you can comment on or make changes to this bug.