encode outfilename and Text as utf-8