write to out.txt with UTF-8