Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io.AsciiCodec class API Spec is incomplete #31828

Closed
iarkh opened this issue Jan 10, 2018 · 0 comments
Closed

io.AsciiCodec class API Spec is incomplete #31828

iarkh opened this issue Jan 10, 2018 · 0 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-convert type-documentation A request to add or improve documentation

Comments

@iarkh
Copy link
Contributor

iarkh commented Jan 10, 2018

Dart API specification for io.AsciiCodec class is incomplete:

  1. const AsciiCodec({bool allowInvalid: false }) description reads:
    Encoders will not accept invalid (non Latin-1) characters.

It seems like it should be
Encoders will not accept invalid (non **ASCII**) characters.

  1. AsciiDecoder decoder description reads:
Returns the decoder of this, converting from T to S.
It may be stateful an should not be reused.

It's not clear what are T and S here and the second clause should be changed to:

It may be stateful **and** should not be reused.
  1. AsciiEncoder encoder - the same as for the previous point.

  2. String name Name of the encoding description reads:
    If the encoding is standardized, this is the lower-case version of one of the IANA official names for the character set (see http://www.iana.org/assignments/character-sets/character-sets.xml)

But probably it would be better just to write that name should be us-ascii here.

  1. No descriptions for the decodeStream and encode methods.
@vsmenon vsmenon added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-convert type-documentation A request to add or improve documentation and removed library-convert labels Jan 10, 2018
dart-bot pushed a commit that referenced this issue Nov 3, 2018
, #31831

1. Override documentation for Codec.decoder and Codec.encoder so that
   mysterious type parameters `T` and `S` don't appear in documentation, e.g.
   https://api.dartlang.org/stable/2.0.0/dart-convert/Encoding/decoder.html.
   This fixes the documentation for subclasses, including AsciiCodec,
   Latin1Codec, Utf8Codec, and SystemEncoding.
2. Fix typo in `const AsciiCodec()`.
3. Override documentation for AsciiCodec.name.
4. Override documentation for Latin1Codec.name.
5. Override documentation for Utf8Codec.name.
6. Document `const SystemEncoding()`.

Bug: #31827, #31828, #31829, #31830, #31831
Change-Id: I292e1cbafff991b55ab67dba684692b686f3b8de
Reviewed-on: https://dart-review.googlesource.com/c/82788
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
@srawlins srawlins closed this as completed Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-convert type-documentation A request to add or improve documentation
Projects
None yet
Development

No branches or pull requests

3 participants