Can't compile Pascal componets

Advertisement

yut
Guest

Can't compile Pascal componets

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Can't compile Pascal componets

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

Reply with quote

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
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

Reply with quote

yut
Guest

martin 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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
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

Reply with quote

yut
Guest

martin 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?
/*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.

Reply with quote

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".

Reply with quote

Advertisement

You can post new topics in this forum