Previous upgrade to 1.8 failed because of PCRE2 behavior. It raises an exception if non-UTF character is met in a string. It always expects UTF, since strings in Crystal are always UTF. See https://crystal-lang.org/api/1.8.1/Regex.html for more.
In this PR I add MATCH_INVALID_UTF flag for most of regular exceptions (that are applied to data read from a file). With this approach no errors should be raised.
:zap: Summary
Previous upgrade to 1.8 failed because of PCRE2 behavior. It raises an exception if non-UTF character is met in a string. It always expects UTF, since strings in Crystal are always UTF. See https://crystal-lang.org/api/1.8.1/Regex.html for more.
In this PR I add MATCH_INVALID_UTF flag for most of regular exceptions (that are applied to data read from a file). With this approach no errors should be raised.