OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart.io; | 5 part of dart.io; |
6 | 6 |
| 7 /// The current system encoding. |
7 const SystemEncoding SYSTEM_ENCODING = const SystemEncoding(); | 8 const SystemEncoding SYSTEM_ENCODING = const SystemEncoding(); |
8 | 9 |
9 /** | 10 /** |
10 * The system encoding is the current code page on Windows and UTF-8 on | 11 * The system encoding is the current code page on Windows and UTF-8 on |
11 * Linux and Mac. | 12 * Linux and Mac. |
12 */ | 13 */ |
13 class SystemEncoding extends Encoding { | 14 class SystemEncoding extends Encoding { |
14 const SystemEncoding(); | 15 const SystemEncoding(); |
15 | 16 |
16 String get name => 'system'; | 17 String get name => 'system'; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 _WindowsCodePageDecoderSink(this._sink); | 123 _WindowsCodePageDecoderSink(this._sink); |
123 | 124 |
124 void close() { | 125 void close() { |
125 _sink.close(); | 126 _sink.close(); |
126 } | 127 } |
127 | 128 |
128 void add(List<int> bytes) { | 129 void add(List<int> bytes) { |
129 _sink.add(_WindowsCodePageDecoder._decodeBytes(bytes)); | 130 _sink.add(_WindowsCodePageDecoder._decodeBytes(bytes)); |
130 } | 131 } |
131 } | 132 } |
OLD | NEW |