在运行python中因为添加了中文注释,遇到SyntaxError: Non-UTF-8 code starting with '\xb8' in file

经过百度,说是Python的默认编码格式是UTF-8,若指定编码格式则需在开头添加如下代码: #-*-coding:gb2312-*- 

相关文章:

  • 2022-01-01
  • 2022-03-04
  • 2021-05-09
  • 2021-09-11
  • 2022-01-28
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2022-01-28
  • 2022-02-20
相关资源
相似解决方案