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

Character Encoding #214

Closed
ThiloL opened this issue May 31, 2018 · 3 comments
Closed

Character Encoding #214

ThiloL opened this issue May 31, 2018 · 3 comments

Comments

@ThiloL
Copy link

ThiloL commented May 31, 2018

Can Get-SFTPChildItem handle path names in ISO8859-1 encoding? FileZilla has an connection option:
image

I think there is a Encoding property in the SSH.Net's connection info object.

@darkoperator
Copy link
Owner

darkoperator commented May 31, 2018 via email

@ThiloL
Copy link
Author

ThiloL commented May 31, 2018

In the ConnectionInfo class there is the encoding property. You could make it accessible..

public class ConnectionInfo : IConnectionInfoInternal, IConnectionInfo
    {
        public ConnectionInfo(string host, string username, params AuthenticationMethod[] authenticationMethods);
        public ConnectionInfo(string host, int port, string username, params AuthenticationMethod[] authenticationMethods);
        public ConnectionInfo(string host, int port, string username, ProxyTypes proxyType, string proxyHost, int proxyPort, string proxyUsername, string proxyPassword, params AuthenticationMethod[] authenticationMethods);

        public Encoding Encoding { get; set; }
        public int RetryAttempts { get; set; }
        public int MaxSessions { get; set; }

@MVKozlov
Copy link
Contributor

I've tested
$session.Session.ConnectionInfo.Encoding = [System.Text.Encoding]::GetEncoding($myencoding) method for file listings - it works, May be it also will work for file names in transfer

@darkoperator darkoperator pinned this issue Apr 1, 2023
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