fix convertToUTF8 and bring back testValidateNonUTF8()