Encode UTF-8 string from unicode object.