Topic "Encoding UTF-8 and .NET assembly / COM Library"

Author Message
pmsousa
[View user's profile]

Joined: 2013-10-16
Posts: 1
Location: Portugal
Hi,

I'm using a Powershell script (I've seen on this Forum similar posts using the same base Powershell script) to Sync Directories (.SynchronizeDirectories) but I'm having a problem with character encoding.

I'm from Portugal and we use accents and other special characters when writing, so it's normal for user to use those characters on file and folder names.

If I connect to my remote host (Linux based) with WinSCP and set the UTF-8 Encoding from "Auto" to "On", the remote files and folders are shown correctly with accents and other special characters (like ""); with "Auto" the "special" characters become garbage.

My first Powershell script used the "$sessionOptions.Protocol = [WinSCP.Protocol]::SFtp" but my local files and folder names with special characters become garbage. My second attempt was to find if there was an option to set the UTF-8 Encoding to "On" on the Session Class but there's none. I've also read something on the Forum about the ability to use UTF with the protocols SFtp and Scp; so I've switched the protocol to Scp ("$sessionOptions.Protocol = [WinSCP.Protocol]::Scp") but also the same result.
Folders.png (17.25 KB)

Description: Local folder screen shot

Folders.png

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Use Utf raw session settings:
http://winscp.net/eng/docs/rawsettings
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License