BREAKING CHANGE: dart:io StringEncoder / StringDecoder removed

153 views
Skip to first unread message

Florian Loitsch

unread,
Aug 27, 2013, 5:32:07 AM8/27/13
to anno...@dartlang.org, General Dart Discussion
I forgot to add this to the Encoding change.

What changed?
The `StringEncoder` and `StringDecoder` classes have been removed from dart:io.

Who is affected?
Only dart:io users (or transitive users of it) are affected by this change.
Only users of StringEncoder / StringDecoder. (If your code doesn't contain any `new StringEncoder`, or `new StringDecoder` you are probably safe).

How do I update my code?
Import 'dart:convert' and use the decoders of the Encodings.
Examples:
new StringDecoder() -> UTF8.decoder
new StringDecoder(encoding) -> encoding.decoder
new StringEncoder() -> UTF8.encoder

Why did this change happen?
This happened as part of the Encoding change (announced yesterday).

When will the change take effect?
The change was committed yesterday with r26632.
--
Give a man a fire and he's warm for the whole day,
but set fire to him and he's warm for the rest of his life. - Terry Pratchett
Reply all
Reply to author
Forward
0 new messages