py/unicode: Fix check for valid utf8 being stricter about contn chars.

This commit is contained in:
Damien George
2018-11-26 16:13:08 +11:00
parent d63ef86c6e
commit 7c85c7c210
2 changed files with 5 additions and 1 deletions

View File

@@ -47,3 +47,7 @@ try:
str(bytearray(b'ab\xc0a'), 'utf8')
except UnicodeError:
print('UnicodeError')
try:
str(b'\xf0\xe0\xed\xe8', 'utf8')
except UnicodeError:
print('UnicodeError')