Fix toUTF8 and toUTF16 issue.