Topic "Can't compile Pascal componets"

Author Message
yut

Guest


I want to add utf8 support for SCP. For this I want to replace classes string with widestring in DirView.pas, but I can't compile it. In Delphi 5 there are not several base modules, Delphi 6 and Delphi 7 make error in DragDetect (CustomDirView.pas). Maybe I must define OLD_DND?
Explain me, please, how I can compile Pascal componets. Thanks.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
WinSCP 5.0.x uses UnicodeString thoughout the code. Make sure you use 5.0.x source code and Embarcadero C++ Builder 2010.
_________________
Martin Prikryl
yut

Guest


Thanks for answer. I have router with installed OpenWRT with unicode support. By default OpenWRT dropbear does not support sftp, scp/ssh only. Putty works correct in unicode and command 'touch' makes right file names. In WinXP (Russia locale) samba works with utf8 without problems. In Ubuntu mc with fish also works correct with utf-8 file names.
Winscp 4.3.7 shows filename in codepage Win-1251. For example, РСѓСЃСЃРєРСЏ - filename with russian letters. I tried to compile the source code of 4.3.7. C++ code using makefile is going, but the Pascal components could not compile in Delphi 5, 6, 7. Can you explain how I can compile it?
I looked Winscp 5.0.6, the problem remains. File names are not displayed right in utf8.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
yut wrote:
I looked Winscp 5.0.6, the problem remains. File names are not displayed right in utf8.

Neither 5.0.x support UTF8 with SCP. I just wanted you to suggest that if you want to add UTF8 support to SCP, start with 5.0.x, where everything else, including the pascal components use wide strings already.
_________________
Martin Prikryl
yut

Guest


prikryl wrote:

I just wanted you to suggest that if you want to add UTF8 support to SCP, start with 5.0.x, where everything else, including the pascal components use wide strings already.

For me it is easier to work with winscp 4 than with winscp 5. I think to use functions UTF8ToAnsi and AnsiToUTF8 with ItemDisplayName like in TDirView without WideStrings. I will try to insert them to TUnixDirView or TCustomUnixDirView. By compilator directive {$DEFINE OLD_DND} pascal components are well compiled. I'll try, but it will not quickly.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
yut wrote:
For me it is easier to work with winscp 4 than with winscp 5.

I do not think this is a good decision. Anyway, your choice.
_________________
Martin Prikryl
yut

Guest


prikryl wrote:
yut wrote:
For me it is easier to work with winscp 4 than with winscp 5.

I do not think this is a good decision. Anyway, your choice.

For a good implementation, I have to modify the function CopyToLocal. I need to copy a file from the remote to a file with a different name to the temp. While I made a temporary support for the implementation of UTF8 without it, but it's not very good. What is the scp command to do this? This line will be correct for it?
Code:

/*CopyToLocal*/         { -1, -1, F, F, T, "scp -r %s -d -f \"%s\" \"%s\"" /* options, file */ },

Can you describe in detail the parameters TSCPFileSystem :: SCPSink and where you can change the file name to synchronize? I hope for your support. Thank you.
yut

Guest


yut wrote:

Can you describe in detail the parameters TSCPFileSystem :: SCPSink and where you can change the file name to synchronize? I hope for your support.

These questions were solved. Now I try to modify file name in window "Copying".
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