More efficient utf8 encode/decode handling.