<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Encoding: TextDecoder does not strip BOM"
   href="https://bugs.webkit.org/show_bug.cgi?id=169858#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Encoding: TextDecoder does not strip BOM"
   href="https://bugs.webkit.org/show_bug.cgi?id=169858">bug 169858</a>
              from <span class="vcard"><a class="email" href="mailto:annevk&#64;annevk.nl" title="Anne van Kesteren &lt;annevk&#64;annevk.nl&gt;"> <span class="fn">Anne van Kesteren</span></a>
</span></b>
        <pre>This has been the behavior since the API was introduced. We did introduce a flag ignoreBOM that makes it not stripped.

There'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't be too costly.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>