-
Notifications
You must be signed in to change notification settings - Fork 21
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
Support non-utf8 file names #42
Comments
I encountered the same problem |
Would just using a |
Yes
but
So I would like to find a more universal solution because I don't even like #39 that much |
OsString would be an alternative then? |
I could make a PR replacing with OsString @AspectUnk, don't see the disadvantage |
@AspectUnk Made a most definitely working implementation with OsString in #44 |
After conducting research, I can say that UTF-16 support is not provided for in the specification because there is inconsistency regarding the size of a string character.
@gulrotkake Replacing Some leave the choice of encoding strings in UTF-16 to the end user, but warn that the remote server must also support it. It is possible to add this as a feature, but it is an extremely specific solution, so leaving #39 would be more appropriate. I may take care of it, but not very soon. If I'm wrong about anything let me know. |
So it's pretty much a choice between not having utf-8 or not supporting windows @AspectUnk ? I'd rather have the latter, but maybe there's another way |
Perhaps I misunderstood you, but it already supports utf-8 by default and at the same time windows, and #39 solves all problems with characters unsuitable for parsing. |
Btw, along with this we can add support for the unfinished version of specification v6 (page 16) since it has a solution for sending charset. |
When will the version be released?😂 |
If given a non-utf8 filename, such as
SftpSession::read_dir(path_to_directory)
will fail to list the directory, asfilename
inDirEntry
is of type string andtry_get_string
throws an error when encountering a non-utf8 string.A solution could be to use OsString or PathBuf, I'll try to write a PR, but I've barely started climbing the Rust learning curve :)
The text was updated successfully, but these errors were encountered: