S
S
Sergey Krylov2016-08-02 21:23:46
Python
Sergey Krylov, 2016-08-02 21:23:46

How to solve problem in Python with UTF-8?

Good day of the day. I searched the internet and did not find the answer.
What's the problem, well, I played with the visual, it seems to have nothing to do with Python.
Well, then I put the python in the visual and I tried it and noticed that it does not display the Cyrillic alphabet.
Shows that there is a problem with UTF-8.
I went to another Eclipse environment again, the same problem (although everything worked before).
Found the line: # -*- coding: cp1251 -*-
If you write it at the beginning, it works. Honestly xs why.
I would like to know why it could break, and how to fix it so as not to write this line every time.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-08-02
@sim3x

Resave the files in utf
Change the line to# coding: utf-8

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question