micropython/tests/unicode/file_invalid.py

6 wiersze
122 B
Python

try:
f = open("data/utf-8_invalid.txt", encoding="utf-8")
f.read()
except UnicodeError:
print("UnicodeError")