当前位置:网站首页>GBK error in web page Chinese display (print, etc.), solution

GBK error in web page Chinese display (print, etc.), solution

2022-07-05 07:27:00 work-harder

background

  • Alone ” Related modules and codes “ Bring up , Topic standard bgk Kind of mistake , Easy to find
  • win10, anaconda 4.8.4, python 3.8.3
  • This is an extract from the previous document , Did not go out to find the original , Directly to “ original ” classification , No need to verify the original source .
  • Thanks to the original author .

python Output , Display time ,gbk Solutions to class errors

  • Import required sys, io Two modules
  • import sys
  • import io
  • sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding=‘utf-8’)
  • sys.stdout - … This line is placed before other code .
原网站

版权声明
本文为[work-harder]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140555476052.html