kopia lustrzana https://github.com/micropython/micropython
tests/unicode: Add test for invalid utf-8 file contents.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>pull/6044/merge
rodzic
6c3d8d38bf
commit
bd4e45fd68
|
@ -0,0 +1 @@
|
||||||
|
aa<EFBFBD>bb
|
|
@ -0,0 +1,5 @@
|
||||||
|
try:
|
||||||
|
f = open("unicode/data/utf-8_invalid.txt", encoding="utf-8")
|
||||||
|
f.read()
|
||||||
|
except UnicodeError:
|
||||||
|
print("UnicodeError")
|
Ładowanie…
Reference in New Issue