bacobart / transmission-remote-dotnet

Automatically exported from code.google.com/p/transmission-remote-dotnet
GNU General Public License v3.0
0 stars 0 forks source link

Plink/SSH support should be UTF8/Unicode friendly #266

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Setup plink support for running remote commands
2. use a command like "echo '$DATA';read"
3. Try the remote command against a torrent with non-ASCII or UTF8 
characters

What is the expected output? What do you see instead?
It should show the non-ASCII or Unicode character.  It does not.  It goes 
through a translation through the local Windows codepage (typically 437)

What version of the products are you using?
OS: Windows 7
Transmission: 1.93
Remote: 3.22 (rev 612)

Please provide any additional information below.

Note #1: that using procexp locally on Windows, the commandline information 
is passed properly.  However, what .Net object you are using the start the 
Plink process is forcing Plink to convert the commandline via the local 
codepage.  You should instead invoke Plink with a Unicode codepage. 

Note #2: If you open up a local command prompt (CMD.EXE) and "chcp 1252" or 
"chcp 65001" you will note that Plink works properly when passed a 
commandstring with non-ASCII characters.  The problem is that you are 
invoking in in the local machine codepage context.

Original issue reported on code.google.com by reardo...@gmail.com on 13 May 2010 at 11:46

GoogleCodeExporter commented 8 years ago
I recommend that you use ProcessStartInfo struct instead of the simpler 
Process.Start, 
and play with UseShellExecute true/false.  That may let you avoid the codepage 
translation step.

Original comment by reardo...@gmail.com on 14 May 2010 at 12:07

GoogleCodeExporter commented 8 years ago
Are you sure, plink can use nonascii chars?

Make a try: create a file (like "cmdline.txt"): echo "pastenonasciichars"
and use plink: plink hostname -m cmdline.txt

Original comment by elso.and...@gmail.com on 26 May 2010 at 6:44