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

Unified Diff: sdk/lib/codec/encoding.dart

Issue 17580014: dart:convert library. Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update Created 7 years, 5 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/codec/codec_sources.gypi ('k') | sdk/lib/codec/json.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/codec/encoding.dart
diff --git a/sdk/lib/codec/encoding.dart b/sdk/lib/codec/encoding.dart
new file mode 100644
index 0000000000000000000000000000000000000000..4c870936efe213485b689345d4b56e0c5a311e69
--- /dev/null
+++ b/sdk/lib/codec/encoding.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of dart.codec;
+
+abstract class Encoding {
+ static const UTF8 = const Utf8Codec();
+ static const ASCII = const AsciiCodec();
+ static const ISO_8859_1 = const Iso8859_1Codec();
+}
+
+class Utf8Codec extends Codec<String, List<int>> {
+ const Utf8Codec();
+
+ Converter get encoder => new Utf8Encoder();
+ Converter get decoder => new Utf8Decoder();
+}
+
+class AsciiCodec extends Codec<String, List<int>> {
+ const AsciiCodec();
+
+ Converter get encoder => new AsciiEncoder();
+ Converter get decoder => new AsciiDecoder();
+}
+
+class Iso8859_1Codec extends Codec<String, List<int>> {
+ const Iso8859_1Codec();
+
+ Converter get encoder => new Iso8859_1Encoder();
+ Converter get decoder => new Iso8859_1Decoder();
+}
« no previous file with comments | « sdk/lib/codec/codec_sources.gypi ('k') | sdk/lib/codec/json.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698