这是我的代码
print('Status: 200 OK')
print('Content-Type: text/html;')
print('')
a = "Κέτσαπ - Συστατικά: Πάστα τομάτας"
print(a)
这是我得到的错误
Traceback (most recent call last): File "C:\inetpub\wwwroot\karomi_website\test\python
\greek.py", line 8, in print(a) File "C:\Python34\lib\encodings\cp1252.py", line 19, in
encode return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-5:
character maps to
我需要在IIS中做些什么吗?
尝试打印(sys.getdefaultencoding())及其UTF-8。所以我不确定cp1252来自哪里?