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

Unified Diff: experimental/tools/generate-unicode-test-txt

Issue 2142023002: tools/SkShaper: SkStream->blob (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-07-12 (Tuesday) 11:34:35 EDT Created 4 years, 5 months 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
« no previous file with comments | « no previous file | tools/SkShaper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | tools/SkShaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698