"python, encoding output to utf-8",f.write(s.encode('utf8'))