UTF-8 encode tmp file.