#32 correct invalid UTF-8 detection