使用 python 在命令提示符中打印 čžšđć

printing čžšđć in command prompt with python

我真的很沮丧:

当 运行 python example.py

时出现错误
# -*- coding: utf-8 -*- 
#it's python 3.5 anyway

epic = 'ščđžć'
print(epic)

我得到:

return codec.charmap_encode(input,self.errors, encoding_map)[0]
UnicodeEncodeError: 'Charmap'

知道如何解决这个问题吗?

运行 windows 上的此命令会将格式更改为 UTF-8

chcp 65001