Skip to content
Advertisement

Cyrillic alphabet in help function from Python 3 don’t work in Powershell Windows 10

I have this function:

JavaScript

And this is what i get in Powershell, when i use help(decomposition):

JavaScript

When i use Cyrillic alphabet in print it works. It also works normally in Linux when i add “# coding: utf-8” in the beginning of file. However, this does not help in Windows. I also tried this to change Powershell encoding:

JavaScript

I can’t find methods to change help function encoding manually like we can do in print function.

Advertisement

Answer

Solved definitely after applying UTF-8 Everywhere rigorously in Windows.

Tried using different alphabet combination (Latin, Cyrillic and Greek scripts) as follows: type .testHelp.py

JavaScript

Result if run from pure cmd or from PowerShell (version 5.1) or from pwsh (version 7):

JavaScript
JavaScript

(or Copy&Paste the above code in an open python prompt).

Settings:

Language for non-Unicode programs

Addendum: You met a mojibake case; for instance, Вызов (the 1st word in your example) is shown as ┬√чют due to the following mojibake mechanism:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement