Search code examples
vimmkdir

Create directory with UTF-8 name in Vim


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

  • Found it.

    I should use iconv function:

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