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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27219</bug_id>
          
          <creation_ts>2014-11-01 15:28:19 +0000</creation_ts>
          <short_desc>Small fixes for TextEncoder.encode() method.</short_desc>
          <delta_ts>2014-11-01 16:36:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>Encoding</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Arkadiusz Michalski (Spirit)">crimsteam</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
    
    <cc>www-international</cc>
          
          <qa_contact>sideshowbarker+encodingspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>114414</commentid>
    <comment_count>0</comment_count>
    <who name="Arkadiusz Michalski (Spirit)">crimsteam</who>
    <bug_when>2014-11-01 15:28:19 +0000</bug_when>
    <thetext>Hi, I found this small inaccuracy:

https://encoding.spec.whatwg.org/#dom-textencoder-encode

&quot;The encode(input, options) method, when invoked...&quot; &lt;&lt; /options/ not exist for this method, should be just &quot;encode(input)&quot;. In algorithm I don&apos;t see using /options/ at least once.

For the same case, in green box, this text can be delete:

&quot;If options&apos;s stream is set to true, the method can be invoked multiple times to process a fragmented stream.&quot; &lt;&lt; this is funcionality of TextDecoder, not TextEncoder.

But in the other site encode() should support streaming like decode()? 

I test this in Firefox an Chrome:

&lt;script type = &quot;text/javascript&quot;&gt;

	alert(new TextEncoder().encode(&quot;&quot;, 2,2,2,2));

&lt;/script&gt;

and get the result:

- Chrome works fine, ignores additional arguments
- Firefox throw &quot;TypeError: Argument 2 of TextEncoder.encode can&apos;t be converted to a dictionary&quot;. Looks like Firefox take attention to the second argument but why? Its bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114415</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-01 16:21:36 +0000</bug_when>
    <thetext>TextEncoder used to support streaming, but that was made obsolete when we switched from DOMString to USVString. There&apos;s no encoding for which you need multiple scalar values to get a byte sequence.

Firefox might still have the old binding.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114416</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-01 16:36:59 +0000</bug_when>
    <thetext>https://github.com/whatwg/encoding/commit/991c5b6f65fbdf815ace714bbc0d862ba2977e08</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>