Yuyi Wang
Yuyi Wang
Well, I understand your choice. It's OK to not merge this PR, and I did this only for interest. Now we know the pros and cons of this implementation. Pros:...
Yes, it's the correct source. I'll update the commit message later. I tested `nix` by enabling `--all-features`.
Finally I reuse the prefix parser from Windows. Now the cygwin `Path` can handle Win32 path correctly. It should behave a little different as it allows `/` as verbatim separater....
@jeremyd2019 > I was going to raise the issue of encoding, but looking at the code it doesn't seem to deal with WIN_A as a different encoding than POSIX paths,...
OK, seems that the command line is converted from UTF-16: https://github.com/cygwin/cygwin/blob/972872c0d396dbf0ce296b8280cee08ce7727b51/winsup/cygwin/dcrt0.cc#L902 And stdin handles the encoding conversion: https://github.com/cygwin/cygwin/blob/972872c0d396dbf0ce296b8280cee08ce7727b51/winsup/cygwin/fhandler/pty.cc#L3935 So I think all inputs are UTF-8 for a Cygwin program, and...
Now I'm a little worried about `cygwin_conv_path` then. If the maintainers someday find that it should handle code page encodings, the code here will be messed up:(
In such locale, Rust doesn't even work on Linux. That's fair:)
@tgross35 ping?
> Should there be some testing of `//` prefixes, like `//?/C:/foo/bar` and `//server/share/foo.txt`? I'll add some immediately.
Added tests for `//` prefixes and mixed separater verbatim paths.