B
B
blazer-052015-01-10 14:13:39
Django
blazer-05, 2015-01-10 14:13:39

Is the encoding displayed incorrectly?

Save this code to a file

# -*- coding: utf-8 -*-
spisok = []
hto_vvedet = input ('Введите пожалуйста, что вам необходимо, разделяйте запятой и нажмите Enter: ')
spisok .append(hto_vvedet)
print (spisok)
input('Нажмите Enter что бы выйти')

I run the file and get such a krakozyabra?
0842656e2dc34510a2ffb4db8fdbc4ae.jpg
In all environments, by default, utf-8 is displayed normally in programs, only if you run the file for execution, then this is what happens. It's under Windows 7.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Rikcon, 2015-01-10
@Rikcon

anvarichn.livejournal.com/43752.html May help

N
Nick93, 2015-01-10
@Nick93

input ('Введите пожалуйста, что вам необходимо, разделяйте запятой и нажмите Enter: '.encode('utf-8')).
print (spisok.'.encode('utf-8'))

try like this.

D
Denis Verbin, 2015-02-23
@rez0n

Here's a solution for you .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question