ISSUE-440: Small fixes for TextEncoder.encode() method

Small fixes for TextEncoder.encode() method

State:
CLOSED
Product:
encoding
Raised by:
Richard Ishida
Opened on:
2015-03-30
Description:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27219

This issue tracks the bug listed above and was created as part of the WG CR process.

---
Reporter: crimsteam@gmail.com



Hi, I found this small inaccuracy:

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

"The encode(input, options) method, when invoked..." << /options/ not exist for
this method, should be just "encode(input)". In algorithm I don't see using
/options/ at least once.

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

"If options's stream is set to true, the method can be invoked multiple times
to process a fragmented stream." << 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:

<script type = "text/javascript">

alert(new TextEncoder().encode("", 2,2,2,2));

</script>

and get the result:

- Chrome works fine, ignores additional arguments
- Firefox throw "TypeError: Argument 2 of TextEncoder.encode can't be converted
to a dictionary". Looks like Firefox take attention to the second argument but
why? Its bug?
Related Actions Items:
No related actions
Related emails:
  1. I18N-ISSUE-440 (BUG27219): Small fixes for TextEncoder.encode() method [encoding] (from sysbot+tracker@w3.org on 2015-03-30)

Related notes:

Bug marked RESOLVED and FIXED.

Richard Ishida, 30 Mar 2015, 13:49:20

These issues are now tracked at http://www.w3.org/International/docs/encoding/encoding-cr-doc

Richard Ishida, 16 Sep 2015, 11:55:23

Display change log ATOM feed


Addison Phillips <addison@amazon.com>, Chair, Richard Ishida <ishida@w3.org>, Fuqiao Xue <xfq@w3.org>, Atsushi Shimono <atsushi@w3.org>, Staff Contacts
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: index.php,v 1.326 2018/10/13 17:29:51 vivien Exp $