Encode strings as UTF-8.