Index: lib/json/json.dart |
=================================================================== |
--- lib/json/json.dart (revision 9716) |
+++ lib/json/json.dart (working copy) |
@@ -80,6 +80,7 @@ |
static final int CHAR_9 = 57; |
static final int COLON = 58; |
static final int CHAR_CAPITAL_E = 69; |
+ static final int CHAR_CAPITAL_U = 85; |
static final int LBRACKET = 91; |
static final int BACKSLASH = 92; |
static final int RBRACKET = 93; |
@@ -295,6 +296,19 @@ |
} |
position += 4; |
break; |
+ case CHAR_CAPITAL_U: |
+ // Non-standard 32 bit characters of format \UHHHHHHHH. |
siva
2012/07/18 17:11:31
What do you mean by non-standard here? not part of
hausner
2012/07/18 22:20:36
I reverted the changes in this file, they are no l
|
+ if (position + 9 > length) { |
+ _error('Invalid unicode esacape sequence'); |
+ } |
+ final codeString = json.substring(position + 1, position + 9); |
+ try { |
+ c = Math.parseInt('0x${codeString}'); |
+ } catch (var e) { |
+ _error('Invalid unicode esacape sequence'); |
+ } |
+ position += 8; |
+ break; |
default: |
_error('Invalid esacape sequence in string literal'); |
} |