Subject: Re: B19: How to read dos (crlf) text files?
From: [email-masked] (Ross Johnson)

27 Aug 1998 09:08:36 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Wilfried Hennings <[email-masked]>
Cc: [email-masked]

What about doing this:

tr -d '\015' < infile | html2rtf > outfile

I'm assuming that tr.exe is the GNU version the same as in Linux.

Ross

On Tue, 25 Aug 1998, Wilfried Hennings wrote:

> Hello,
> I'm running cygwin32 B19.1 under win95a.
> I take part in developing the latex2rtf converter package
> (previously under the BSD license, now under the GNU license)
> which is being developed under Linux 
> and also compiles and runs ok on a DEC Alpha under DEC OSF/1.
> I now want to get a win32 port of it. 
> It successfully compiles with cygwin32, but if I feed it with
> a dos/win-formatted file (end-of-line = crlf) 
> I get a "read error in line 2".
> If I save the input file in Unix mode (end-of-line = lf),
> it is successfully read.
> Input is via stdin, call is "latex2rtf <infile >outfile"
> 
> YES, I have read the mailing list archive AND also the FAQ.
> 
> NO, I don't want to renew the discussion whether 
> it makes sense to distinguish between text mode and binary.
> 
> I JUST want to get it working.
> 
> The FAQ sais as follows:
> >How is the DOS/Unix CR/LF thing handled?
> >
> >By default, tools that deal with binaries (e.g. objdump) 
> >operate in unix binary mode and tools that
> >deal with text files (e.g. bash) operate in text mode. 
> >
> >You can enable the DOS CR/LF end of line in a text file mode 
> >by setting fmode_binary setting in the registry to 0. 
> 
> I did not find this key. I instead found (among others):
> [HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\
> b15.0\mounts\04]
> "native"="C:"
> "unix"="/"
> "fbinary"=dword:00000000
> "fsilent"=dword:00000000
> 
> Now IS this the required key (obviously it IS set to 0) or not?
> 
> >I've tried to keep the file types 'natural'. 
> >By default a file is opened in text mode.
> >This can be changed by adding O_BINARY 
> >to the second argument of an open call, 
> >or "b" to second argument of an fopen call. 
> >You can also call setmode (fd, O_BINARY). 
> 
> The fopens ARE without the "b" switch.
> 
> What is wrong?
> 
> Thanks for any help,
> 
> Dipl.-Ing. Wilfried Hennings c./o. 
> Forschungszentrum (Research Center) Juelich GmbH, ISR 
> D-52425 Juelich, Germany 
> Tel. (+49) 2461 61 5570 ; Fax (G3+G4) (+49) 2461 61 8254
> email: <[email-masked]>
> my pgp (2.6.3i) public key: <ftp://isr016.isr.kfa-juelich.de/wh.asc>
> ISR homepage: <http://www.kfa-juelich.de/isr/>
> Join the fight against spam!  details at <http://www.cauce.org>
> All opinions mentioned are strictly my own, not my employer's
> 
> -
> For help on using this list (especially unsubscribing), send a message to
> "[email-masked]" with one line of text: "help".
> 

+----------------------+---+
| Ross Johnson         |   | E-Mail: [email-masked]
| Info Sciences and Eng|___|
| University of Canberra   | FAX:    +61 6 2015227
| PO Box 1                 |
| Belconnen  ACT    2616   | WWW:    http://willow.canberra.edu.au/~rpj/
| AUSTRALIA                |
+--------------------------+

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".