Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Unified Diff: sdk/lib/io/stdio.dart

Issue 22872012: Remove Encoding-enum from dart:io and add interface in dart:convert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/process.dart ('k') | sdk/lib/io/string_transformer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/stdio.dart
diff --git a/sdk/lib/io/stdio.dart b/sdk/lib/io/stdio.dart
index 3eaa9697a6757392f09be80c0ececf2ae44bbe6f..372552624bc00a8f78c6a90ccbd646ca7fe61cc9 100644
--- a/sdk/lib/io/stdio.dart
+++ b/sdk/lib/io/stdio.dart
@@ -58,7 +58,7 @@ class Stdin extends _StdStream implements Stream<List<int>> {
* If end-of-file is reached after some data has already been read, that data
* is returned.
*/
- String readLineSync({Encoding encoding: Encoding.SYSTEM,
+ String readLineSync({Encoding encoding: SYSTEM_ENCODING,
bool retainNewlines: false}) {
const CR = 13;
const LF = 10;
@@ -69,7 +69,7 @@ class Stdin extends _StdStream implements Stream<List<int>> {
StreamController<List<int>> controller =
new StreamController<List<int>>(sync: true);
- Stream stream = controller.stream.transform(new StringDecoder(encoding));
+ Stream stream = controller.stream.transform(encoding.decoder);
stream.listen((String str) {
line.write(str);
}, onError: (e) {
« no previous file with comments | « sdk/lib/io/process.dart ('k') | sdk/lib/io/string_transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698