close
當讀中文檔時遇到UnicodeDecodeError: 'big5' codec can't decode byte 0xf9 in position 35210: illegal multibyte sequence
應該要使用Big5
發生錯誤時就使用cp950
fileContent = open("C:/Users/Vincent/Dropbox/project/caculate_Time/all.txt", 'r' ,encoding = 'Big5')
listContent = fileContent.read()
fileContent = open("C:/Users/Vincent/Dropbox/project/caculate_Time/all.txt", 'r' ,encoding = 'cp950')
listContent = fileContent.read()
全站熱搜