Python reading from a file and saving to utf-8

后端 未结 3 1877
情书的邮戳
情书的邮戳 2020-11-28 02:51

I\'m having problems reading from a file, processing its string and saving to an UTF-8 File.

Here is the code:

try:
    filehandle = open(filename,\"         


        
3条回答
  •  囚心锁ツ
    2020-11-28 03:13

    You can also get through it by the code below:

    file=open(completefilepath,'r',encoding='utf8',errors="ignore")
    file.read()
    

提交回复
热议问题