Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upnative: Skip non-utf16 filename on Windows #13338
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kballard
Apr 5, 2014
Contributor
Can you give me an example of one of the names? I have a long-standing issue on my plate to reinvestigate filepaths on Windows due to rumors of non-utf16 names, but I don't have any concrete data on this.
Was it some sort of UCS2 name that's invalid UTF-16, or does Windows genuinely let you have names that aren't Unicode at all?
|
Can you give me an example of one of the names? I have a long-standing issue on my plate to reinvestigate filepaths on Windows due to rumors of non-utf16 names, but I don't have any concrete data on this. Was it some sort of UCS2 name that's invalid UTF-16, or does Windows genuinely let you have names that aren't Unicode at all? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
klutzy
Apr 5, 2014
Contributor
I (on win8) succeeded to create files with strange names: [0xd800, 0xdc00] (\U00010000), [0xdc00] (surrogate only) and [0xdc73, 0xdc79] (two low surrogates). The last example is even from system file of recycle bin.
|
I (on win8) succeeded to create files with strange names: |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kballard
Apr 5, 2014
Contributor
@klutzy Ok thanks, that sounds like it's still valid UCS2, just not UTF-16. So it's not a big surprise.
Still, it is a reason why WindowsPath may need to move to using [u8] internally instead of str, which is unfortunate.
|
@klutzy Ok thanks, that sounds like it's still valid UCS2, just not UTF-16. So it's not a big surprise. Still, it is a reason why WindowsPath may need to move to using |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
alexcrichton
Apr 5, 2014
Member
Interesting! I would also like to add a test for this to ensure that this doesn't crop up again. I'm also a little worried how librustuv handles this case.
I don't think that from rust you can easily create a non-utf16 filename, but you should be able to add a run-make test with a file already in the directory.
|
Interesting! I would also like to add a test for this to ensure that this doesn't crop up again. I'm also a little worried how librustuv handles this case. I don't think that from rust you can easily create a non-utf16 filename, but you should be able to add a |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Closing due to inactivity, but feel free to reopen with a rebase! |
klutzy commentedApr 5, 2014
This fixes
glob::test::test_lots_of_filestest on my machine:it entered
C:\$Recycle.Bin\and there were some system files withnon-utf16 names.