Index: experimental/tools/generate-unicode-test-txt |
diff --git a/experimental/tools/generate-unicode-test-txt b/experimental/tools/generate-unicode-test-txt |
index f1052547051955bc684a5df46ce53c2b486e5bdc..76de70ec2595e720a6bb5ae41f8cf383cf3b7e2e 100755 |
--- a/experimental/tools/generate-unicode-test-txt |
+++ b/experimental/tools/generate-unicode-test-txt |
@@ -41,7 +41,7 @@ valid_codepoint_data = ''' |
''' |
if sys.version_info[0] < 3: |
def to_unicode(i): |
- return unichr(i).encode('UTF-8') |
+ return ('\U%08x' % i).decode('unicode-escape').encode('UTF-8') |
else: |
def to_unicode(i): |
return chr(i) |