ISSUE-444: Bunch of small fixes
Bunch of small fixes
- State:
- CLOSED
- Product:
- encoding
- Raised by:
- Richard Ishida
- Opened on:
- 2015-03-30
- Description:
- https://www.w3.org/Bugs/Public/show_bug.cgi?id=27281
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":
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.
- Related Actions Items:
- No related actions
- Related emails:
- I18N-ISSUE-444 (BUG27281): Bunch of small fixes [encoding] (from sysbot+tracker@w3.org on 2015-03-30)
Related notes:
Bug marked RESOLVED and FIXED.
Richard Ishida, 30 Mar 2015, 14:10:11These issues are now tracked at http://www.w3.org/International/docs/encoding/encoding-cr-doc
Richard Ishida, 16 Sep 2015, 11:53:03
Display change log