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

Unified Diff: sdk/lib/utf/utf32.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/uri/encode_decode.dart ('k') | sdk/lib/utf/utf8.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/utf/utf32.dart
diff --git a/sdk/lib/utf/utf32.dart b/sdk/lib/utf/utf32.dart
index f79e45243342f2786da556eee9567dce8b6fe204..9cbfd7aa982e14aabd5262ad3c3c6ac2257b1236 100644
--- a/sdk/lib/utf/utf32.dart
+++ b/sdk/lib/utf/utf32.dart
@@ -96,7 +96,7 @@ List<int> encodeUtf32(String str) =>
* UTF-32BE bytes with no BOM.
*/
List<int> encodeUtf32be(String str, [bool writeBOM = false]) {
- List<int> utf32CodeUnits = str.charCodes();
+ List<int> utf32CodeUnits = stringToCodepoints(str);
List<int> encoding = new List<int>(4 * utf32CodeUnits.length +
(writeBOM ? 4 : 0));
int i = 0;
@@ -120,7 +120,7 @@ List<int> encodeUtf32be(String str, [bool writeBOM = false]) {
* UTF-32BE bytes with no BOM.
*/
List<int> encodeUtf32le(String str, [bool writeBOM = false]) {
- List<int> utf32CodeUnits = str.charCodes();
+ List<int> utf32CodeUnits = stringToCodepoints(str);
List<int> encoding = new List<int>(4 * utf32CodeUnits.length +
(writeBOM ? 4 : 0));
int i = 0;
« no previous file with comments | « sdk/lib/uri/encode_decode.dart ('k') | sdk/lib/utf/utf8.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698