W3C home > Mailing lists > Public > www-international@w3.org > October to December 2014

[Bug 27281] New: Bunch of small fixes

From: <bugzilla@jessica.w3.org>
Date: Sat, 08 Nov 2014 14:38:27 +0000
To: www-international@w3.org
Message-ID: <bug-27281-4285@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27281

            Bug ID: 27281
           Summary: Bunch of small fixes
           Product: WHATWG
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Encoding
          Assignee: annevk@annevk.nl
          Reporter: crimsteam@gmail.com
        QA Contact: sideshowbarker+encodingspec@gmail.com
                CC: mike@w3.org, www-international@w3.org

Hi, I found another small inaccuracy:

===

In algo "process":
https://encoding.spec.whatwg.org/#concept-encoding-process

1. If mode is not given, set it to replacement, if encoderDecoder is a decoder
instance, and fatal otherwise. << should not be /encoderDecoderInstance/
instead of /encoderDecoder/? We pass to this algo /encoderDecoderInstance/.

and next step in the same algo:

2. Let result be the result of running encoderDecoderInstance's handler on
token. << handler operate on two argument but you pass only /token/ (missing
some stream as first).

===

In algo "utf-8 decoder":
https://encoding.spec.whatwg.org/#utf-8-decoder

10. Emit a code point whose value is code point. << "emit" has special meaning
or it is just "return"? Ask because everywhere we have just return.

=== 

In algo "shared utf-16 encoder":
https://encoding.spec.whatwg.org/#shared-utf-16-encoder

2. If code point is in the range 0x00 to 0xFFFF, return the... << this range
can be express as U+0000 to U+FFFF (like everywhere).

=== 

For "run" and "process" algo maybe add in prose that /error mode/ is optional,
sth like this:
"...and optional error mode mode, run these steps:" << just add "optional"
word.

===

In IDL definition for TextEncoder.encode():

Uint8Array encode(optional USVString input = ""); << maybe add [NewObject],
this always return new object.

=== 

In green box for TextDecoder:

fatal.fatal << should be decoder.fatal
ignoreBOM.ignoreBOM << should be decoder.ignoreBOM

and in:

decoder . decode([input [, options]])
If the error mode is fatal set and encoding's decoder returns error, throws an
EncodingError. << "set" can be remove or write "...error mode is set to
fatal..." 

===

In algo "serialize stream":
https://encoding.spec.whatwg.org/#concept-td-serialize

2.3 Otherwise, if token is not end-of-stream, append token to output. << first
"token" is variable.

=== 

In alg "shift_jis decoder":
https://encoding.spec.whatwg.org/#shift_jis-decoder

1. If byte is end-of-stream, shift_jis lead is not 0x00, set shift_jis lead to
0x00 and return error. << what exactly "," means here: & or |?

===

In gray API example 
https://encoding.spec.whatwg.org/#api

function encodeArrayOfStrings has declared encoder = new TextEncoder(encoding);
but its never used. Probably it can be used here (insted of constructor):

encoded[i] = new TextEncoder(encoding).encode(strings[i]); 

====

I guess all, thanks for attention.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Saturday, 8 November 2014 14:38:29 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 21 September 2016 22:37:38 UTC