简体   繁体   English

崇高的文本3 python不打印俄语字符串

[英]sublime text 3 python doesn't print russian strings

my test-program: 我的测试程序:

print ("Hello1")
print ("Привет")
print ("Hello2")

result: 结果:

Hello1
Hello2
[Finished in 0.2s]

In Python IDLE - everything works great. 在Python IDLE中-一切正常。

Is there a solution for this problem? 有解决这个问题的方法吗?

PS I don't want to print in my program "\Р\о\с\с\и". PS我不想在程序“ \\ u0420 \\ u043e \\ u0441 \\ u0441 \\ u0438”中打印。 I want to print "язык" and see printed "язык". 我想打印“язык”,然后查看打印的“язык”。

PPS Or sometimes result is even worse - it doesn't want to print English characters after russian. PPS有时结果甚至更糟-它不想在俄语之后打印英文字符。

Hello1
[Finished in 0.2s]

You should add the line "encoding": "cp1251" to your build system. 您应该在构建系统中添加"encoding": "cp1251"行。 After all it loks like 毕竟它看起来像

{
"cmd": ["YOURPATH/Python/Python35-32/python.exe", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"encoding": "cp1251"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM