遇到转码为utf-8在在屏显中的样式若为这样的:
'Ãëǰ'
'·ÖÖÓÇ'
str.encode('latin1', errors='replace').decode('gbk', errors='replace')


遇到json文件写入文件后显示为utf-8字符编码形式时:
json.dumps(comment, ensure_ascii=False)

相关文章:

  • 2021-11-21
  • 2021-06-06
  • 2021-12-26
  • 2021-08-05
  • 2021-09-19
  • 2021-07-21
  • 2022-12-23
猜你喜欢
  • 2021-07-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2021-06-09
  • 2022-12-23
相关资源
相似解决方案