Index: sdk/lib/io/io_sink.dart |
diff --git a/sdk/lib/io/io_sink.dart b/sdk/lib/io/io_sink.dart |
index b954a86d5ffeed71ac9f0e15677613193ed04251..ac4ce0a1daabeeece9aa0e78da3e55533a5750cf 100644 |
--- a/sdk/lib/io/io_sink.dart |
+++ b/sdk/lib/io/io_sink.dart |
@@ -19,7 +19,7 @@ part of dart.io; |
*/ |
abstract class IOSink implements StreamSink<List<int>>, StringSink { |
factory IOSink(StreamConsumer<List<int>> target, |
- {Encoding encoding: Encoding.UTF_8}) |
+ {Encoding encoding: UTF8}) |
=> new _IOSinkImpl(target, encoding); |
/** |
@@ -204,7 +204,7 @@ class _IOSinkImpl extends _StreamSinkImpl<List<int>> implements IOSink { |
} |
} |
if (string.isEmpty) return; |
- add(_encodeString(string, _encoding)); |
+ add(_encoding.encode(string)); |
} |
void writeAll(Iterable objects, [String separator = ""]) { |