tags:

views:

556

answers:

3

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?

A: 

try this

:!mkdir "привет"
ghostdog74
The same result -`привет`
Maxim Kim
+2  A: 

What I usually do is to switch to the explorer mode with ":Explore" and press "d". It will then ask you for the directory name. Give it that and you'll be good to go.

shinkou
I need this to work in a vimscript.
Maxim Kim
+1  A: 

Found it.

I should use iconv function:

:call mkdir(iconv("привет", "utf-8", "cp1251"))
Maxim Kim