Imported Upstream version 2.3.1
[platform/upstream/harfbuzz.git] / test / shaping / hb_test_tools.py
index 8348dc2..feff70a 100644 (file)
@@ -4,6 +4,10 @@ from __future__ import print_function, division, absolute_import
 
 import sys, os, re, difflib, unicodedata, errno, cgi
 from itertools import *
+try:
+       import unicodedata2 as unicodedata
+except Exception:
+       pass
 
 diff_symbols = "-+=*&^%$#@!~/"
 diff_colors = ['red', 'green', 'blue']
@@ -56,10 +60,10 @@ try:
                                                yield 0x10000 + (high_surrogate - 0xD800) * 0x400 + (cp - 0xDC00)
                                                high_surrogate = None
                                        else:
-                                               yield 0xFFFC
+                                               yield 0xFFFD
                                else:
                                        if high_surrogate:
-                                               yield 0xFFFC
+                                               yield 0xFFFD
                                                high_surrogate = None
                                        if 0xD800 <= cp <= 0xDBFF:
                                                high_surrogate = cp
@@ -67,7 +71,7 @@ try:
                                                yield cp
                                                high_surrogate = None
                        if high_surrogate:
-                               yield 0xFFFC
+                               yield 0xFFFD
 
 except NameError:
        unichr = chr