Failed to add path with wide character
J Decker <[email protected]> Wed, 20 Apr 2016 16:20:35 -0700
| Newsgroups | gmane.comp.version-control.monotone.devel |
|---|---|
| Message-ID | <CAA2GJqWkK259rCnvCAXoJ7=Va_Lqrr9OQ5ojG3p2KDt52vkr3A@mail.gmail.com> |
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 Λ@Λ.com mtn.EXE: misuse: bad character '?' in key name '?@?.com' _______________________________________________ Monotone-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/monotone-devel