1

my test-program:

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

result:

Hello1
Hello2
[Finished in 0.2s]

In Python IDLE - everything works great.

Is there a solution for this problem?

P.S. I don't want to print in my program "\u0420\u043e\u0441\u0441\u0438". I want to print "язык" and see printed "язык".

P.P.S. Or sometimes result is even worse - it doesn't want to print English characters after russian.

Hello1
[Finished in 0.2s]
User New
  • 404
  • 7
  • 23
  • 1
    Possible duplicate of [How to print Unicode character in Python?](http://stackoverflow.com/questions/10569438/how-to-print-unicode-character-in-python) – Matty Dec 22 '15 at 09:22
  • Guessing, I would say that the sublime interpreter is using python 2 and your idle is python 3 maybe? – Netwave Dec 22 '15 at 09:22
  • Matty - no, I think it is not duplicate. I don't want to print in my program "\u0420\u043e\u0441\u0441\u0438". I want to print "язык" and see printed "язык". – User New Dec 22 '15 at 09:27
  • Daniel - also - no. Both - Python and IDLE use the same version of Python 3.5 – User New Dec 22 '15 at 09:28

1 Answers1

2

You should add the line "encoding": "cp1251" to your build system. 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"
}
Matt
  • 14,906
  • 27
  • 99
  • 149