Hello,

 Sorry in advance if I'm simply missing something but it looks like Vim
can't open files with Unicode file names which are not convertible to the
current locale. I'm still using 7.0 (standard Win32 version) but looking at
http://vim.svn.sourceforge.net/viewvc/vim/vim7/src/os_win32.c?view=markup
it seems to be still the same in the latest code as get_cmd_argsW()
function calls WideCharToMultiByte(GetACP()) and this fails (returns a
string full of question marks) if the string can't be represented in the
current user encoding. So, for example, opening a file "Аня.vcf" opens the
file "???.vcf" on my English Windows system. The annoying thing is not only
Vim fails to open it but that notepad (sic) opens it just fine so this
looks like the first example of something notepad does better than Vim I
found since a dozen years of using Vim ;-)

 Assuming I am not missing some trivial option/workaround which would allow
to open these files in Vim and also that nobody is already working on
fixing this, is it realistic to someone reasonably competent with Win32 but
not familiar with Vim code base to fix this? Looking at the code it seems
to be rather difficult to replace the narrow strings representing the file
names with the wide character ones so I thought about "simply" replacing
CP_ACP in os_win32.c with CP_UTF8 and then converting this UTF-8 string to
wchar_t before passing it to any Windows functions. Does this look like a
reasonable approach?

 Thanks in advance for any help!
VZ

Attachment: pgpCPX39FNbC9.pgp
Description: PGP signature

Raspunde prin e-mail lui