fix encoding of UTF8 characters