Powershell UTF8 paths in GetFiles
Hello,
I'm using the example from https://winscp.net/eng/docs/library_session_getfiles in a powershell script to download files from a sftp server.
It works fine if the paths used in GetFiles() don't contain anything else than ASCII characters. If I create a directory on the server that contains german umlauts or chinese Han characters, I get a "No such file or directory" error.
Error with umlaut:
Error with han character:
GetFiles Call:
It does neither work with source nor with destination path.
It looks like the strings are converted to ascii at some point. Does anyone know how to use UTF8 paths in powershell?
I'm using the example from https://winscp.net/eng/docs/library_session_getfiles in a powershell script to download files from a sftp server.
It works fine if the paths used in GetFiles() don't contain anything else than ASCII characters. If I create a directory on the server that contains german umlauts or chinese Han characters, I get a "No such file or directory" error.
Error with umlaut:
Error: Error listing directory '/Aufträge'. No such file or directory. Error code: 2 Error message from server: No such file
Error with han character:
Error: Error listing directory '/ä»S'. No such file or directory. Error code: 2 Error message from server: No such file
GetFiles Call:
$transferResult = $session.GetFiles("/Aufträge/*", "D:\Aufträge\", $False, $transferOptions)
It looks like the strings are converted to ascii at some point. Does anyone know how to use UTF8 paths in powershell?