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

Unified Diff: frog/file_system_vm.dart

Issue 9462001: Unify most of our utf8 implementations. This takes the implementation (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | « no previous file | frog/leg/scanner/node_scanner_bench.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/file_system_vm.dart
===================================================================
--- frog/file_system_vm.dart (revision 5167)
+++ frog/file_system_vm.dart (working copy)
@@ -5,7 +5,7 @@
#library('file_system_vm');
#import('dart:io');
#import('file_system.dart');
-#import('dart:utf8');
+#import('dart:utf');
/** File system implementation using the vm api's. */
class VMFileSystem implements FileSystem {
@@ -21,7 +21,7 @@
var buffer = new List<int>(length);
var bytes = file.readListSync(buffer, 0, length);
file.closeSync();
- return new String.fromCharCodes(Utf8Decoder.decodeUtf8(buffer));
+ return new String.fromCharCodes(new Utf8Decoder(buffer).decodeRest());
}
bool fileExists(String filename) {
« no previous file with comments | « no previous file | frog/leg/scanner/node_scanner_bench.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698