Output in Visual Studio Code can't decode Cyrillic characters:
The same code works fine in PyCharm:
How do I quickly fix this issue? There must be some simple way.
Auto Guess Encoding in Settings doesn't work since it's for files, not the output.
Edit: the problem was the Code Runner extension in VSCode. Disabling it or running script in terminal does the job.
You can configure 'Code Runner' plugin to run your code in the integrated terminal.
Try it:
Ctrl + ,
code runner run in terminal
Now your application with Cyrillic symbols run in Integred Terminal without encoding problems.
The problem lies in the Code Runner encoding itself, since the text is displayed correctly in the terminal.
You can add into settings.json :
"code-runner.executorMap": {"python": "set PYTHONIOENCODING=utf8 && py -u"},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With