fix convertToUTF8 and amend testValidateNonUTF8()

here’s the remaining fixes