python how to write unicode to a txt file

    技术2022-05-19  21

    >>txt = u"ähnlicher als gewöhnlich üblich" >>import codecs >>codecs.open("tmp.txt", "w", "utf8").write(txt) >>codecs.open("tmp.txt", "r", "utf8").read()

     

     


    最新回复(0)