Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

lottiwang

Re: How to transfer Simpled Chinese file correctly with console?

martin wrote:

Thanks for spotting this.
I have added this bug to the tracker:
https://winscp.net/tracker/740


Thanks.I am so glad that I can do something for Winscp.
martin

Re: How to transfer Simpled Chinese file correctly with console?

Thanks for spotting this.
I have added this bug to the tracker:
https://winscp.net/tracker/740
lottiwang

Re: How to transfer Simpled Chinese file correctly with console?

martin wrote:

Thanks for your post.

Though I believe that your change to the source code has the same effect as rawsettings Utf=1

Maybe you just have the syntax wrong. Have you tried:
winscp.com /command "open perflog -rawsettings Utf=1"


I re-downloaded the latest build 5.0.2,and tried again.
It seems I have to store a session first,isn't it?
with my change,I do not have to store a session.

I tried to execute the following command:
D:\winscp5>WinSCP.com /command "open sftp://perflog:mypwd@10.1.164.107:360
00 -rawsettings Utf=1"
Too many parameters for command 'open'.

I don't want to save a session because the password can't be shown.otherwise everyone can login with winscp.exe.

maybe you can add a new feature in next build.
martin

Re: How to transfer Simpled Chinese file correctly with console?

Thanks for your post.

Though I believe that your change to the source code has the same effect as rawsettings Utf=1

Maybe you just have the syntax wrong. Have you tried:
winscp.com /command "open perflog -rawsettings Utf=1"
lottiwang

Re: How to transfer Simpled Chinese file correctly with console?

martin wrote:

/rawsetting was instrduced only in the 5.0.2 beta. Make sure you upgrade.


I did upgrade to 5.0.2 beta.But it is not what I want.

So,I downloaded the source code and spent one day to read it and finally I added a line code in core/SecureShell.cpp at line 33,the constructor of class TSecureShell,follwing the modified code:

__fastcall TSecureShell::TSecureShell(TSessionUI* UI,
TSessionData * SessionData, TSessionLog * Log, TConfiguration * Configuration)
{
FUI = UI;
FSessionData = SessionData;
//add by lottiwang
FSessionData->NotUtf=asOff;
//add end
FLog = Log;
....
}
forced the utf support swith to On.Then rebuild the project,and the winscp.com works well when transfering Simpled Chinese file.

Any way,Thanks a lot.
martin

Re: How to transfer Simpled Chinese file correctly with console?

/rawsetting was instrduced only in the 5.0.2 beta. Make sure you upgrade.
lottiwang

Latest version feedback

I have tried to store a session and use /rawsetting utf=1 to force the charset as utf-8.
winscp.exe /console /open perflog /rawsettings utf=1

But when I try to open,it shows "Too many arguments...",it seems /rawsettings doesn't work?
lottiwang

How to transfer Simpled Chinese file correctly with console?

I have some files to transfer to remote host,but the filename are all Simpled Chinese characters.
I use command [winscp.com /script="script.txt"] ,and the content of script.txt followed:

~~~~~~~
open sftp://perlog:passwd@10.1.163.20:36000
put *.csv
exit
~~~~~~~

when finished,all filenames can't be displayed correctly,they are garbled.