Show More
@@ -74,6 +74,6 b' def jsonescapeu8fallback(u8chars, parano' | |||
|
74 | 74 | else: |
|
75 | 75 | jm = _jsonmap |
|
76 | 76 | # non-BMP char is represented as UTF-16 surrogate pair |
|
77 | u16codes = array.array('H', u8chars.decode('utf-8').encode('utf-16')) | |
|
77 | u16codes = array.array(r'H', u8chars.decode('utf-8').encode('utf-16')) | |
|
78 | 78 | u16codes.pop(0) # drop BOM |
|
79 | 79 | return ''.join(jm[x] if x < 128 else '\\u%04x' % x for x in u16codes) |
General Comments 0
You need to be logged in to leave comments.
Login now