在ubuntu执行python3的时候,出现

UnicodeEncodeError: 'latin-1' codec can't encode characters in position 10-18: ordinal not in range(256)

这是由于当前的操作系统乱码问题导致的。

解决办法:

Ubuntu解决中文乱码问题

网上的其他办法是在使用字符串的时候使用encode指定编码,,如果python文件太大,这样的方式应该会很难受,所以,直接修改操作系统的编码,可以快速解决。

相关文章:

  • 2022-03-02
  • 2021-05-03
  • 2021-09-15
  • 2021-10-22
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案