Posh-SSH
Posh-SSH copied to clipboard
Character Encoding
Can Get-SFTPChildItem handle path names in ISO8859-1 encoding? FileZilla has an connection option:
I think there is a Encoding property in the SSH.Net's connection info object.
To be honest, no clue. Never tested that
Sent from my iPhone
On May 31, 2018, at 6:22 AM, ThiloL [email protected] wrote:
Can Get-SFTPChildItem handle path names in ISO8859-1 encoding? FileZilla has an connection option:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
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; }
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