Summary
I can not to make correct display Cyrillic symbols in SublimeREPL PowerShell.
Expected behavior
In Windows PowerShell I have not this problem.
Actual behavior
Cyrillic symbols always not displayed for me. I see mojibake instead it.
Steps to reproduce
The problem is reproduced for me in a version of Sublime Text without plugins and user settings.
Preferences
→ Key Bindings
→ I change Default (Windows).sublime-keymap - User
:
[
{
"keys": ["super+alt+p"],
"command": "repl_open",
"args": {
"type": "powershell",
"encoding": "utf-8",
"cmd": ["powershell", "-"],
"cwd": "$file_path",
"external_id": "powershell"
}
}
]
When test.md
in my E:\Киролайна
folder is opened, I press Super+Alt+P → I get actual behavior.
Not helped
- I saw in my PowerShell settings. I have
866 (OEM - русская)
encoding.
I change encoding: I run in PowerShell command chcp 65001
:
PS E:\Киролайна> chcp 65001
Active code page: 65001
PS E:\Киролайна> chcp
Active code page: 65001
PS E:\Киролайна>
But problem is remained for me.
I try to change encoding in my keymap file:
"encoding": "$win_cmd_encoding"
"encoding": "cp866"
"encoding": "cp1251"
When I press Super+Alt+P in open file, I get error:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8a in position 9: invalid start byte error: UnicodeDecodeError('utf-8', b'C:\Users\\x8a\xae\xe2\AppData\Roaming', 9, 10, 'invalid start byte')
Correct path is C:\Users\Кот\AppData\Roaming
, path contain Cyrillic symbols Кот
.
Environment
Operating system and version:
Russian Windows 32-bit 10.0.14393
Sublime Text:
Build 3126