W3C home > Mailing lists > Public > public-i18n-core@w3.org > January to March 2015

I18N-ISSUE-444 (BUG27281): Bunch of small fixes [encoding]

From: Internationalization Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Mon, 30 Mar 2015 14:09:33 +0000
To: public-i18n-core@w3.org
Message-Id: <E1YcaNh-0008Q8-L4@maia.w3.org>
I18N-ISSUE-444 (BUG27281): Bunch of small fixes [encoding]


Raised by: Richard Ishida
On product: encoding


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


Reporter: crimsteam@gmail.com

Hi, I found another small inaccuracy:


In algo "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":

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":

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"


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


In algo "serialize stream":

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


In alg "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 

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.
Received on Monday, 30 March 2015 14:09:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:02:05 UTC