Encode unicode characters