Create directory with UTF-8 name in Vim

Viewed 29399

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?

4 Answers

What I usually do is I switch to the explorer mode with :Explore and press d. It asks me for the directory name, then.

Found it.

I should use iconv function:

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