Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non UTF-8 filenames gives vague error #12

Open
BlueAmulet opened this issue Jan 7, 2021 · 7 comments
Open

Non UTF-8 filenames gives vague error #12

BlueAmulet opened this issue Jan 7, 2021 · 7 comments

Comments

@BlueAmulet
Copy link

BlueAmulet commented Jan 7, 2021

Downloaded version 20210105

When I run ntfs2btrfs.exe D:\, all I get back instantly is just the message wstring_convert::to_bytes and it does nothing
And the drive I want to convert is infact D:\ and it is formatted as NTFS, has no compressed files although I see the newest version added in compressed file support.

@maharmstone
Copy link
Owner

It looks like it's complaining because the parameter is invalid UTF-8, for whatever reason. Did you copy and paste the command line from somewhere, and it's got invisible crud on the end? Or possibly using a non-English keyboard, and typing a non-Latin character which is identical to "D"? (I'm not sure there are any.)

What version of Windows are you on, and which language?

@TheMadHau5
Copy link

TheMadHau5 commented Jan 7, 2021

Besides Eth, or D with a pre-composed accent, there are a few mathematical symbols but I'd assume they aren't easy to type.
(Full list here: http://www.unicode.org/Public/security/latest/confusables.txt; I searched for LATIN CAPITAL LETTER D)

@BlueAmulet
Copy link
Author

I'm using Windows 10 2004 in English, US-QWERTY keyboard, after testing a bit I can see that it actually says "Processing inode" and gets to around ... 60? before it just says "wstring_convert::to_bytes" and gives up

@BlueAmulet
Copy link
Author

BlueAmulet commented Jan 7, 2021

The problem was because of some non UTF-16 filenames in a Windows.old\$RECYCLE.BIN, after removing them conversion went smoothly

@BlueAmulet BlueAmulet changed the title Doesn't work? Non UTF-8 filenames gives vague error Jan 7, 2021
@maharmstone
Copy link
Owner

Thanks. Are you able to tell me what they were, so I can reproduce it? NTFS stores all filenames as UTF-16, and I wasn't aware there was any UTF-16 string that wstring_convert would refuse to convert to UTF-8...

@BlueAmulet
Copy link
Author

Unfortunately I don't have them anymore. To be honest I think that drive might have been corrupted at some point. $Recycle.Bin is not supposed to be all uppercase and it's contents are supposed to be 8.3 sized filenames starting with dollar signs, not long filenames with garbage characters at the beginning.

It was pretty easy to get ntfs2btrfs to fail again on a test image though. NTFS names are usually UTF-16 but they're allowed to contain any 16bit value aside from 0, and CreateFileW will happily create a file with bad surrogates. But not something that is normally done, so feel free to close the issue.

@maharmstone
Copy link
Owner

Bad surrogates was the only thing I could think of... I'll change it so it gives a warning and skips the inode, rather than stopping the whole thing entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants