unicode().decode('utf-8', 'ignore') raising UnicodeEncodeError

前端 未结 3 1443
无人共我
无人共我 2020-11-30 21:08

Here is the code:

>>> z = u\'\\u2022\'.decode(\'utf-8\', \'ignore\')
Traceback (most recent call last):
  File \"\", line 1, in 

        
3条回答
  •  自闭症患者
    2020-11-30 21:13

    You're trying to decode a unicode. The implicit encoding to make the decode work is what's failing.

提交回复
热议问题