I\'m using gvim on Windows.
In my _vimrc I\'ve added:
set shell=powershell.exe set shellcmdflag=-c set shellpipe=> set shellredir=> function!
The initial example code works fine for me when I plop it in vimrc.
So now I'm trying to figure out what in my vimrc is making it function. Possibly:
set encoding=utf8
Edit: Yep, that appears to do it. You probably want to have VIM defaulting to unicode anyway, these days...