[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: point_lun



Craig Markwardt wrote:
> 
> "R.Bauer" <R.Bauer@fz-juelich.de> writes:
> >
> > I have recognized today  point_lun makes differences between files
> > written on UNIX or DOS
> > for  following idl version.
> 
> This almost certainly has something to do with the difference between
> end-of-line conventions in Unix and Windows worlds.  I believe that
> windows/DOS uses a CR/LF while Unix simply uses an LF.
> 
> I don't understand *exactly* what is going wrong though, but it seems
> that Windows may be assuming that a CR/LF pair are present in your
> Unix file when only one of them is there.  What's wierd is that it's
> using that information in the POINT_LUN call.  This may not be a bug
> in IDL but rather in the Windows library that IDL uses.  The Microsoft
> people probably don't even consider it a bug but a feature...
> 
> There are converters that can do the Unix<->DOS conversion for you,
> but unfortunately it's an extra ugly step.
> 


It depends on how it was written.  Even DOS C programs will happily convert each
newline in your output to a carraige return/newline pair, unless told not to
with some kind of BINARY mode.  All formatted windows/dos output will reflect
this conversion, unless it is somehow disabled.  Many FTP programs will do this
to, for example (unless in binary mode).

JD

-- 
 J.D. Smith                             |*|      WORK: (607) 255-5842    
 Cornell University Dept. of Astronomy  |*|            (607) 255-6263
 304 Space Sciences Bldg.               |*|       FAX: (607) 255-5875 
 Ithaca, NY 14853                       |*|