UnicodeDecodeError, invalid continuation byte

前端 未结 10 1960
忘掉有多难
忘掉有多难 2020-11-22 08:25

Why is the below item failing? Why does it succeed with "latin-1" codec?

o = "a test of \\xe9 char" #I want this to remain a string as thi         


        
10条回答
  •  伪装坚强ぢ
    2020-11-22 08:59

    This happened to me also, while i was reading text containing Hebrew from a .txt file.

    I clicked: file -> save as and I saved this file as a UTF-8 encoding

提交回复
热议问题