cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: problem of FTPLISTONLY on solaris

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 2 Mar 2003 18:14:02 +0100 (CET)

On Fri, 28 Feb 2003, Phalnikar, Amol wrote:

> > I am encountering a problem in ftp. I want to get multiple files
> > from ftp server.
> > So I am first doing FTPLISTONLY and getting list of file and writing
> > it in a file and again reading the file and getting individual files
> > through server in a loop.
> >
> > This works fine in windows. But in case of unix ( solaris ), when I
> > am writing the output of FTPLISTONLY to file, it contains a control
> > character ^M. So it is not possible to view the file. Has anyone came
> > across such problem ??
> >
> > If anyone has solution to this, can you please post it on mailing
> > list ?

Sure, strip off all ^M character from the directory lists.

^M is the CR (ascii letter 13) that is used in combination with LF (ascii 10)
to make newlines. DOS/Windows use that kind of newlines natively, while unix
systems only use LF and treat CR as weird characters

Or what am I missing?

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-03-02