Unix import of a DOS spreadsheet...
Richard Kreiss
rkreiss at verizon.net
Wed Sep 8 07:06:14 PDT 2010
Reference filePro Developers Reference 4th edition page 369 secs
25.09.04 & 25.10.02
25.09.04 Four Special codes are provided
Code Function ASCCI Equivalent
\r CR -Carriage Return
\n NL - New Line 10 Unix
13/10 Windows/DOS
\f TAB - Tab (or spaces) 9
\f FF - Form Feed 12
Import ascii filename r=\n f=, o=" c="
In the above reference on a *nix system filePro will look for a new line
(ASCII equivalent 10) as the record separator. On a Windows system (file)
it would look for CR/NL or a carriage Return/New Line (ASCII 13/10). Simply
put, depending on the version of fp you are using, \n looks for the proper
record delimiter.
In the case mentioned, the file was created on a Windows system so the end
of record marker was CR/NL. When brought to a *nix system, this was the
incorrect end of record marker and as Ken pointed out, would need to be
changed.
Where Stuart mentioned n=10&13 was for a record separator when "CREATING" a
file on a Unix system for use in Windows not for import.
Richard
> -----Original Message-----
> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
> Behalf Of Jeff Harrison
> Sent: Wednesday, September 08, 2010 8:59 AM
> To: filepro-list at lists.celestial.com
> Subject: RE: Unix import of a DOS spreadsheet...
>
> --- On Tue, 9/7/10, Richard Kreiss <rkreiss at verizon.net> wrote:
>
> [Fairlight wrote]
>
> > > Can I just be the first (and probably the last) to
> > say, "WTF?!"
> > >
> > > I honestly can't tell what you're on about, as the
> > above doesn't parse in
> > code
> > > -or- in English--at least not for me.
> > >
> > > mark->
>
> > From: Richard Kreiss <rkreiss at verizon.net>
> > Subject: RE: Unix import of a DOS spreadsheet...
> > To: "'Fairlight'" <fairlite at fairlite.com>,
> > filepro-list at lists.celestial.com
> > Date: Tuesday, September 7, 2010, 10:34 PM Mark,
> >
> > \n = ASCII 10 or NL(new Line for Unix)
> >
> > \n= ASCII 13/10 (CR\NL carriage return\New line) for Windows
> >
> > Therefore \R\n on a Unix box looks for a new line for the record end.
> >
> > On a Windows box \R\n import looks for a carriage return and a new
> > line CR\NL
> >
> > This eliminates the byte problem on a windows box using import \r.
> >
> > Richard
> >
>
> WTF?! :-)
>
> Richard, can you post some actual code to perhaps demonstrate what you
> are talking about? I'm not getting it either.
>
> Jeff Harrison
> jeffaharrison at yahoo.com
> Author of JHImport and JHExport.
>
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list