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

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, 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
Index: frog/file_system_vm.dart
===================================================================
--- frog/file_system_vm.dart (revision 4630)
+++ 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 {
@@ -22,7 +22,7 @@
var buffer = new List<int>(length);
var bytes = file.readListSync(buffer, 0, length);
file.closeSync();
- return new String.fromCharCodes(Utf8Decoder.decodeUtf8(buffer));
+ return decodeUtf8(buffer);
ahe 2012/02/29 13:23:02 Please keep the explicit call to new String.fromCh
dgrove 2012/03/02 12:34:30 decodeUtf8 returns a String, while string.fromChar
ahe 2012/03/05 12:55:53 Doesn't this work: return new String.fromCharCode
dgrove 2012/03/05 13:35:13 Done.
}
bool fileExists(String filename) {

Powered by Google App Engine
This is Rietveld 408576698