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; |