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

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

Issue 11411092: Revert "Add some support for the code-point code-unit distinction." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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/core/string.dart ('k') | sdk/lib/uri/encode_decode.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/string_stream.dart
diff --git a/sdk/lib/io/string_stream.dart b/sdk/lib/io/string_stream.dart
index 00ff3bce2cd611e59820a265d49d22c4e314d0d5..c16815327dba39d7f330498dd09b29db38ee91b9 100644
--- a/sdk/lib/io/string_stream.dart
+++ b/sdk/lib/io/string_stream.dart
@@ -270,7 +270,6 @@ class _UTF8Encoder implements _StringEncoder {
static int _encodeString(String string, List<int> buffer) {
int pos = 0;
int length = string.length;
- // TODO(erikcorry): Use new iterator over charcodes.
for (int i = 0; i < length; i++) {
int additionalBytes;
int charCode = string.charCodeAt(i);
@@ -286,7 +285,6 @@ class _UTF8Encoder implements _StringEncoder {
if (buffer != null) buffer[pos] = ((charCode >> 12) & 0x0F)| 0xE0;
additionalBytes = 2;
} else {
- i++; // Skip surrogate pair.
// 11110xxx (xxx is top 3 bits)
if (buffer != null) buffer[pos] = ((charCode >> 18) & 0x07) | 0xF0;
additionalBytes = 3;
« no previous file with comments | « sdk/lib/core/string.dart ('k') | sdk/lib/uri/encode_decode.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698