Create directory with UTF-8 name in Vim
Question
I can not create a directory in russian (UTF-8) using vimscript in WinXP.
For example
:call mkdir("привет")
creates directory with привет
name instead of привет
.
I have also tried
:call system("mkdir привет")
with the same result.
Is it possible?
Solution 3
Found it.
I should use iconv function:
:call mkdir(iconv("привет", "utf-8", "cp1251"))
OTHER TIPS
What I usually do is I switch to the explorer mode with :Explore
and press d
. It asks me for the directory name, then.
try this
:!mkdir "привет"
You can change encod. Add:
chcp 65001
:call mkdir("привет")
chcp 65001 - UTF-8
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow