Subject: RE: B20.1: CR-LF translation not always handled properly
From: Bernard Dautrevaux <[email-masked]>
To: "'Jon Leichter'" <[email-masked]>, Bernard Dautrevaux <[email-masked]>
Cc: [email-masked]
Date: Mon, 25 Oct 1999 11:33:43 +0200

> -----Original Message-----
> From: Jon Leichter [mailto:[email-masked]]
> Sent: Friday, October 22, 1999 9:32 PM
> To: Bernard Dautrevaux
> Cc: [email-masked]
> Subject: RE: B20.1: CR-LF translation not always handled properly
> 
> 
> Bernard,
> 
> Thanks for your comments. This is EXACTLY what I have been 
> talking about.
> 
> Thanks for pointing out that 'cat' is doing the right thing. 
> I forgot the fact
> that 'cat' is SUPPOSED to use binary mode.
> 
> I'm glad that you've been able to confirm my dilemma. I still 
> have a problem
> that remains. Although I can manually use a tool to suppress 
> ^M characters
> (like grep), there is no automated general solution (that I 
> can think of) to
> change the various 'configure' and 'libtool' scripts in the 
> projects that I
> build. I can manually edit these files, but I think that is 
> the WRONG move.
> 
> Like I've said... for the time being, I've been using Mingw32 
> support provided
> by Cygwin. I'd prefer to use the standalone Mingw32 package, 
> but until these
> textmode/binmode translations are fixed, that just won't be possible.
> 
> To summarize, you and I both believe that the following tools 
> are 'broken':
> 
> - bash, sh, ash (command substitution)
> - sed

True; would be nice if someone with some spare time (I'm afraid I don't have
:-<) could fix these for the next net release of cygwin (sould be happening
soon I think).

> 
> There are probably others, but I like I said, I haven't done 
> an extensive job
> of auditing the other tools.

Me neither; the sh problem just forced me to change my environment and
cross-compile all my NT code from unix boxes, using cross-mingw32 tools.

> 
> In the case of 'cat', perhaps a switch could be added to the tool to
> specifically use textmode when specified. This would be 
> useful to add to
> scripts where you 'knew' you were processing text files.

This is not needed: either the one that read cat output is expecting text,
and it will strip the ^M, or it expects binary data, and all is right :-)
The problem with this annoying text/binary mode is that _every_ tool must be
writtent by being cautious on the type of data it expects. However we must
_never_ try to guess what our users will need.

Best regards,

		Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingéniérie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	[email-masked]
		[email-masked]
-------------------------------------------- 

--
Want to unsubscribe from this list?
Send a message to [email-masked]