delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/08/07/04:16:44

X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: line endings, file path names
Date: Mon, 7 Aug 2006 10:16:25 +0200
Message-ID: <8B45926190D2834CA1870E3015EED56901BCD77E@midom01.win.magnus.local>
In-Reply-To: <44D26C47.6080405@netacquire.com>
From: "Peter Ring" <PRI AT magnus DOT dk>
To: <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k778GdEp005931

The notion of an OS-dependent 'native' text file format is fundamentally rotten; you all seem to agree on this.

The fact that this legacy has crept into standards is all for the worse, and really not much help; you will anyway always have to manage the character encoding of text files.

Whether or not utilities should do automagical munging of text files is another question.

I've been bitten too many times by 'intelligent' utilities that make uninformed decisions, so I tend to prefer to be in control, i.e., *I* manage character encoding and record separators.

There are utilities that will help you guess if need be, e.g. 'dos2unix' and 'file'. I sometimes use 'file --mime' to assert the proper encoding of text files.

Kind regards
Peter Ring



> -----Original Message-----
> From: cygwin-owner AT cygwin DOT com 
> [mailto:cygwin-owner AT cygwin DOT com]On Behalf
> Of Joachim Achtzehnter
> Sent: 3. august 2006 23:36
> To: cygwin AT cygwin DOT com
> Subject: Re: line endings, file path names
> 
> 
> Hi Corinna,
> 
> You wrote:
> 
> > So, since millions of users have DOS and Mac lineending 
> files, every 
> > system in the world has to support them?
> 
> I'm not suggesting that any system "has to" do anything, as 
> the author or
> funder of a system you can decide what you want it to do. I'm 
> trying to
> persuade you that it would be better for its users, and 
> indirectly even for
> you because these kind of discussions would go away, if it did.
> 
> > Sed does not support CRLF and CR line endings on POSIX systems.
> 
> And it can to some extent get away with this because 
> communication programs
> like ftp and http clients are supposed to translate line 
> endings to the
> native convention when downloading text files from other systems. This
> doesn't always work because of user errors and incorrect file 
> types, but on
> a native POSIX system one can at least legitimately assume 
> that most files
> will have native line endings. In the case of Cygwin such an 
> assumption is
> simply not warranted because Cygwin always runs on systems 
> where CRLF is
> the native convention.
> 
> > It just has a bad hack for Windows systems which is also enabled for
> > Cygwin.
> 
> It is "bad" only when compared to a possible world without 
> CRLF, but we, at
> least most of us, don't have the luxury of living in such a world.
> 
> Software developers are often faced with requirements that 
> seem less than
> desirable from an aesthetic point of view and we have to get 
> things working
> in spite of it. This is one of those cases.
> 
> > On other systems you have to take the official route over 
> dos2unix or
> > recode or whatever.
> 
> As I tried to explain above, at least on those other systems 
> the need for
> dos2unix might be the exception instead of the rule. In spite of this,
> given that CRLF platforms are now so wide-spread and given 
> how systems are
> now so inter-connected, even UNIX users are likely to benefit 
> from text
> processing tools that tolerate both conventions, c.f. the pragmatic
> approach taken by XML.
> 
> > Oh well, the longer this discussion takes, the more I 
> regret my decision
> > to revert sed to textmode.
> 
> This means my argumentation has been counter-productive. :(
> 
> Note, I realize how entrenched the opposite point of view 
> seems to be in
> this community and I don't have any illusions of quickly converting
> everybody. By sticking to arguments instead of emotions I was 
> trying to
> avoid this very reaction of yours. My goal is to plant a 
> thought in the
> back of people's minds so that perhaps gradually they might begin to
> appreciate my point of view and take it into account a little 
> bit when 
> similar calls need to be made again about one detail or another.
> 
> Thanks for reading,
> 
> Joachim
> 
> -- 
> work:     joachima AT netacquire DOT com   (http://www.netacquire.com)
> private:  joachim AT kraut DOT ca          (http://www.kraut.ca)
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019