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

Unified Diff: dart/frog/file_system_vm.dart

Issue 9423034: Implement most of String API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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 | dart/frog/leg/lib/js_helper.dart » ('j') | dart/frog/leg/lib/js_helper.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/file_system_vm.dart
diff --git a/dart/frog/file_system_vm.dart b/dart/frog/file_system_vm.dart
index 7b2944e4af90d626d87e446c6106e293bb75b766..1d906fc4db982ef14934675aaed8dee6736a8286 100644
--- a/dart/frog/file_system_vm.dart
+++ b/dart/frog/file_system_vm.dart
@@ -5,6 +5,7 @@
#library('file_system_vm');
#import('dart:io');
#import('file_system.dart');
+#import('dart:utf8');
/** File system implementation using the vm api's. */
class VMFileSystem implements FileSystem {
@@ -21,7 +22,7 @@ class VMFileSystem implements FileSystem {
var buffer = new List<int>(length);
var bytes = file.readListSync(buffer, 0, length);
file.closeSync();
- return new String.fromCharCodes(buffer);
+ return new String.fromCharCodes(Utf8Decoder.decodeUtf8(buffer));
}
bool fileExists(String filename) {
« no previous file with comments | « no previous file | dart/frog/leg/lib/js_helper.dart » ('j') | dart/frog/leg/lib/js_helper.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698