<?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>169858</bug_id>
          
          <creation_ts>2017-03-19 06:19:03 -0700</creation_ts>
          <short_desc>Encoding: TextDecoder does not strip BOM</short_desc>
          <delta_ts>2020-09-02 20:06:55 -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>DOM</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>216108</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne van Kesteren">annevk</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>ap</cc>
    
    <cc>cdumez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1289360</commentid>
    <comment_count>0</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2017-03-19 06:19:03 -0700</bug_when>
    <thetext>See https://github.com/w3c/web-platform-tests/pull/5172. Test at https://w3c-test.org/submissions/5172/encoding/textdecoder-copy.any.html and https://w3c-test.org/submissions/5172/encoding/textdecoder-copy.any.worker.html for now (until that PR lands).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1289393</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-03-19 13:45:16 -0700</bug_when>
    <thetext>This seems like it may be performance sensitive. What&apos;s the rationale?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1289443</commentid>
    <comment_count>2</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2017-03-20 00:58:09 -0700</bug_when>
    <thetext>This has been the behavior since the API was introduced. We did introduce a flag ignoreBOM that makes it not stripped.

There&apos;s many UTF-8 entry points in the platform that strip a leading BOM, so offering that functionality seems very reasonable and since you know about whether or not it needs to happen when TextDecoder is constructed, it should not necessarily be performance-sensitive I think, but you might want to branch during decode for convenience, which shouldn&apos;t be too costly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1685119</commentid>
    <comment_count>3</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2020-09-02 20:06:55 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 216108 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>