<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>18110</bug_id>
          
          <creation_ts>2008-03-26 09:30:12 -0700</creation_ts>
          <short_desc>xml document with x-mac-hebrew reports empty document?</short_desc>
          <delta_ts>2023-09-21 09:34:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>XML</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>annevk</cc>
    
    <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>75305</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-03-26 09:30:12 -0700</bug_when>
    <thetext>xml document with x-mac-hebrew reports empty document?

I&apos;m probably doing something wrong...  See test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75307</commentid>
    <comment_count>1</comment_count>
      <attachid>20082</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-03-26 09:32:49 -0700</bug_when>
    <thetext>Created attachment 20082
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75308</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-03-26 09:33:35 -0700</bug_when>
    <thetext>If you remove the &lt;?xml declaration then the document loads just fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75513</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-03-27 13:52:01 -0700</bug_when>
    <thetext>&lt;rdar://problem/3977880&gt;

This is a tricky bug, and we are not aware of any actual sites that use this encoding (not counting test pages as real).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75610</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-03-28 02:42:34 -0700</bug_when>
    <thetext>I guess some more explanation is required :)

See item 2 and the following item 1 of &lt;ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/APPLE/HEBREW.TXT&gt; - MacHebrew has &apos;&lt;&apos; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1978849</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-09-20 18:02:39 -0700</bug_when>
    <thetext>Both Chrome Canary 119 and Safari 16.6, we get following:

&gt;&gt; error on line 1 at column 44: Unsupported encoding x-mac-hebrew

Do we need anything to do here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1978934</commentid>
    <comment_count>6</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-09-21 03:00:38 -0700</bug_when>
    <thetext>We&apos;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&apos;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,&lt;?xml%20version=&quot;1.0&quot;%20encoding=&quot;a&quot;?&gt;&lt;b/&gt;

If at some point we decide to look at XML again maybe it&apos;s worth sorting this out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979027</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-09-21 08:39:32 -0700</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979040</commentid>
    <comment_count>8</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-09-21 09:34:50 -0700</bug_when>
    <thetext>Renaming back and closing as it&apos;s no longer supported per Source/WebCore/PAL/pal/text/TextCodecICU.cpp.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>20082</attachid>
            <date>2008-03-26 09:32:49 -0700</date>
            <delta_ts>2008-03-26 09:32:49 -0700</delta_ts>
            <desc>test case</desc>
            <filename>invalid-xml-x-mac-hebrew.xml</filename>
            <type>application/xml</type>
            <size>227</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0ieC1tYWMtaGVicmV3IiA/Pgo8cm9vdD4KIDxm
YWlsPiBUaGlzIGlzIHZhbGlkIHgtbWFjLWhlYnJldywgSSB0aGluaz8gPC9mYWlsPgogPHRlc3Qv
PiA8IS0tIHNob3VsZG4ndCBldmVyIGJlIHBhcnNlZCwgYXMgdGhlIHBhcnNlciBzaG91bGQgYWJv
cnQgYXQgdGhlIGZpcnN0IHNpZ24gb2Ygbm9uLXdlbGwtZm9ybWVkbmVzcyAtLT4KPC9yb290Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>