D
D
Dmitry2016-03-26 11:57:50
Python
Dmitry, 2016-03-26 11:57:50

Problems with python 3 encoding. How to be?

I often encounter encoding errors and usually managed to solve them.
I am attaching the code and output.
The first line of the program is: # -*- coding: utf-8 -*- I re-
read about 5 articles about encodings that I found in Russian, the mess in my head only increased.
I don't know how to be. Python3
Thanks in advance!
11cb8ed8431942bc943d6b2b191e6ad0.JPG8ee53947722f422a8338683f62783c90.JPG

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pcdesign, 2016-03-26
@Flex24

PyCharm menu bar: File -> Settings... -> Editor -> File Encodings, then set: "IDE Encoding", "Project Encoding" and "Default encoding for properties files" ALL to UTF-8

I
Igor Alyakimov, 2016-03-26
@kaiten

Be sure to read this https://docs.python.org/2/library/urllib.html#urll... , what you have written generates a huge number of errors.
Are you sure the encoding is utf8? And then an error in the encoding cp1251

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question