fixed encoding of multi-byte utf-8 characters.