Return fully-escaped string if utf8 conversion fails

This adds a new function for validating UTF-8 sequences by converting to
UTF-32. This allows us to also check for various blocks of codepointsi
that we consider invalid while checking for valid sequences in general.
This commit is contained in:
Tim Wojtulewicz 2021-06-04 17:28:20 -07:00
parent b28fc77054
commit f442893c98
2 changed files with 84 additions and 29 deletions

View file

@ -1,4 +1,4 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
"\\x07Էo"
start "\\x07Էo"137T[9, 10] finish
"\\x07\\xd4\\xb7o"
start "\\x07\\xd4\\xb7o"137T[9, 10] finish
é