Найти - Пользователи
Полная версия: Кириллица в Input()
Начало » Python для новичков » Кириллица в Input()
1
titov_
Python 3.5.2

 #-*-coding:utf-8-*-
input("Нажмите Enter ...")

Выводит в консоли:

 ╨Э╨░╨╢╨╝╨╕╤В╨╡ Enter ...
Traceback (most recent call last):
  File "D:\CODE\Python\...\...\....py", line 3, in <module>
    input("╨Э╨░╨╢╨╝╨╕╤В╨╡ Enter ...")
  File "<string>", line 0
    ^
SyntaxError: unexpected EOF while parsing

py.user.next
  
>>> s = '╨Э╨░╨╢╨╝╨╕╤В╨╡'
>>> s.encode('cp866').decode('utf-8')
'Нажмите'
>>>

Поменять надо кодировку в самой консоли.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB