“surrogateescape” cannot escape certain characters

后端 未结 3 1128
你的背包
你的背包 2021-01-17 18:30

Regarding reading and writing text files in Python, one of the main Python contributors mentions this regarding the surrogateescape Unicode Error Handler:

3条回答
  •  离开以前
    2021-01-17 18:57

    For what reason should a low-surrogate DCC3 be encoded in utf-8? This is not allowed and useless because a surrogate is NOT a character. Find the high-surrogate that belongs to the low-surrogate, decode its codepoint and then create the proper utf-8 sequence for the codepoint.

提交回复
热议问题