[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] Failed to add path with wide character
From: |
J Decker |
Subject: |
[Monotone-devel] Failed to add path with wide character |
Date: |
Wed, 20 Apr 2016 16:20:35 -0700 |
This fails under windows.
I have this project which uses the directory Λ (Greek Lamba)
"mkdir Λ"
mtn add Λ
mtn.EXE: error: could not open directory 'dekcore/?': The filename,
directory name, or volume label syntax is incorrect.
1) the input from command line to main( int argc, char **argv ) gets a '?'
2) using GetCommandLine() returns command line with '?' in it.
3) using GetCOmmandLineW() returns with correct character in it, but
it's wchar_t*
In my own project today (after discovering this, and trying to locate
where the failure is) I now do GetCommandLineW() convert it to utf-8,
parse it using windows command line rules (quoted things stay
together, otherwise break on spaces) and then use it normally
internally until I get to the file system again, which I do convert
the utf-8 string to wchar_t ( which is probably UCS2 and not UTF16)
and then pass the filename to wfopen()... ( CreateFileW() if
appropriate ).
C:\>mtn genkey address@hidden
mtn.EXE: misuse: bad character '?' in key name 'address@hidden'
- [Monotone-devel] Failed to add path with wide character,
J Decker <=