68c28174d0
This patch adds a function utf8_check() to check for a valid UTF-8 encoded string, and calls it when constructing a str from raw bytes. The feature is selectable at compile time via MICROPY_PY_BUILTINS_STR_UNICODE_CHECK and is enabled if unicode is enabled. It costs about 110 bytes on Thumb-2, 150 bytes on Xtensa and 170 bytes on x86-64. |
||
---|---|---|
.. | ||
data | ||
file1.py | ||
file2.py | ||
unicode.py | ||
unicode_chr.py | ||
unicode_id.py | ||
unicode_index.py | ||
unicode_iter.py | ||
unicode_ord.py | ||
unicode_pos.py | ||
unicode_str_format.py | ||
unicode_str_modulo.py | ||
unicode_subscr.py |