提交 b225593d 编写于 作者: D David Corbett 提交者: Behdad Esfahbod

Correct REPLACEMENT CHARACTER's code point to FFFD (#1471)

上级 1683bb2c
......@@ -60,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
......@@ -71,7 +71,7 @@ try:
yield cp
high_surrogate = None
if high_surrogate:
yield 0xFFFC
yield 0xFFFD
except NameError:
unichr = chr
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册