fixed UTF-8 verification
test for handling of invalid UTF-8 JavaScript encode() encoding