encode as utf-8