Answer the question
In order to leave comments, you need to log in
Why does Python 3 give out porridge from Russian characters?
I tried running a regular python file:
# -*- coding: utf-8 -*-
print("Привет мир!")
python App.py
# coding=utf-8
## coding=utf-8
Answer the question
In order to leave comments, you need to log in
No, you need to save the Python file itself in utf-8 encoding, even the BOM is not needed. How? Or in IDE, or in FAR'e.
It is not necessary to write in python3 # -*- coding: utf-8 -*-
.
The solution is to look at the encoding of the file (for example, in notepad++, pspad), it should be utf-8
. It's even better to use VsCode, there are no such problems in principle.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question