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

Unified Diff: sdk/lib/_internal/compiler/implementation/util/characters.dart

Issue 11418115: Fix Unicode issues in dart2js and dart2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove accidental test expectation dupe 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
Index: sdk/lib/_internal/compiler/implementation/util/characters.dart
diff --git a/sdk/lib/_internal/compiler/implementation/util/characters.dart b/sdk/lib/_internal/compiler/implementation/util/characters.dart
index 064efe7136cccf90600121234b839e2bdd492dc9..5961d0764a0d78de9abba943782c89a4e971725a 100644
--- a/sdk/lib/_internal/compiler/implementation/util/characters.dart
+++ b/sdk/lib/_internal/compiler/implementation/util/characters.dart
@@ -133,3 +133,11 @@ bool isUnicodeScalarValue(int value) {
return value < $FIRST_SURROGATE ||
(value > $LAST_SURROGATE && value <= $LAST_CODE_POINT);
}
+
+bool isUtf16LeadSurrogate(int value) {
+ return value >= 0xd800 && value <= 0xdbff;
+}
+
+bool isUtf16TrailSurrogate(int value) {
+ return value >= 0xdc00 && value <= 0xdfff;
+}

Powered by Google App Engine
This is Rietveld 408576698