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

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

Issue 14223007: Make common file mode and encoding constants available on the top level in dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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/file.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/string_transformer.dart
diff --git a/sdk/lib/io/string_transformer.dart b/sdk/lib/io/string_transformer.dart
index 7cc9bc0f7eb0ebee03b843910314b7b06205edc8..4a70f44532d4d435fad70fae6d81c84204072b44 100644
--- a/sdk/lib/io/string_transformer.dart
+++ b/sdk/lib/io/string_transformer.dart
@@ -12,6 +12,12 @@ class Encoding {
static const Encoding ISO_8859_1 = const Encoding._internal("iso-8859-1");
static const Encoding ASCII = const Encoding._internal("us-ascii");
+ /**
+ * SYSTEM encoding is the current code page on Windows and UTF-8 on
+ * Linux and Mac.
+ */
+ static const Encoding SYSTEM = const Encoding._internal("system");
+
// All aliasses (in lowercase) of supported encoding from
// http://www.iana.org/assignments/character-sets/character-sets.xml.
static Map<String, Encoding> _nameToEncoding = <String, Encoding> {
@@ -67,14 +73,12 @@ class Encoding {
*/
final String name;
- /**
- * SYSTEM encoding is the current code page on Windows and UTF-8 on
- * Linux and Mac.
- */
- static const Encoding SYSTEM = const Encoding._internal("system");
const Encoding._internal(String this.name);
}
+const UTF_8 = Encoding.UTF_8;
+const ISO_8859_1 = Encoding.ISO_8859_1;
+const ASCII = Encoding.ASCII;
/**
* Stream transformer that can decode a stream of bytes into a stream of
« no previous file with comments | « sdk/lib/io/file.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698