AW: Different results in LC with a file from 2 FTP programs

Tiemo Hollmann TB toolbook at kestner.de
Wed Dec 3 09:46:43 EST 2014


Hi Dave,
that sounds plausible, I will give that a try
Thanks
Tiemo

> -----Ursprüngliche Nachricht-----
> Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im
Auftrag
> von Dave Cragg
> Gesendet: Mittwoch, 3. Dezember 2014 14:09
> An: How to use LiveCode
> Betreff: Re: Different results in LC with a file from 2 FTP programs
> 
> On 2 Dec 2014, at 13:54, Tiemo Hollmann TB <toolbook at kestner.de> wrote:
> 
> > Hello,
> >
> > I am downloading a ASCII txt file with "put URL tFile into tContent"
> > from my server. Then I filter the content of the file in LC 6.5.2 to
> > get the wanted data. I changed my FTP program on Windows to FileZilla
> > because my old FTP program didn't had a SFTP protocol, which I wanted
> > to use now. When uploading the same file which is locally 397 KB with
> > the old FTP program in ASCII mode it increases on my server to 385 KB.
> > When uploading it with FileZilla-SFTP in ASCII mode it shows the excat
397
> KB in the server.
> >
> >
> >
> > Here comes my issue. My LC fails processing the content of the same
> > file, when it is uploaded with FileZilla, because after the filter
> > command each line still has a "CR" at the end of the line, which is
> > not there, when the same file was uploaded with the old FTP program.
> > Usually I would have expected a "CR" at the line end, but I have never
> > watched it and because it wasn't there with my old FTP program I coded
> > without expecting a "CR" and now my program fails with the new format.
> > It is easy to change my code, but there are a lot of licences out
> > there at my customers, which I can't change that easy.
> 
> Tiemo,
> 
> It appears that Filezilla does nothing to the data content when
transferring
> in ascii mode. There is some information here:
> 
> https://wiki.filezilla-project.org/Data_Type
> 
> That would explain why the file size didn't change when uploaded.
> 
> Normally, I would consider that a good thing. I always use binary mode in
ftp
> to avoid any unexpected changes. However, in your case, if your
application is
> set to handle the previous format of the uploaded file, I can see it will
be a
> problem for existing users.
> 
> Can you compare the content of the same file uploaded with the previous
ftp
> application with the file uploaded by Filezilla? I'm guessing that the
> previous ftp program converted LF (ascii 10) line endings to CRLF (ascii
13 +
> ascii 10). But it would be good to check. Then, if you are able to set the
> file content to match the previous format before uploading with Filezilla,
you
> should be OK. For example, if my guess is correct, replace all linefeed
> characters with CRLF.
> 
> Cheers
> Dave
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list