Remove redundant semicolons
Fix handling of invalid byte sequences in UTF8 decoding