delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/05/02/05:00:13

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Date: Tue, 2 May 2000 11:58:26 +0200 (MEST)
Message-Id: <200005020958.LAA11157@burner.fokus.gmd.de>
From: schilling AT fokus DOT gmd DOT de
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: hybrid text/binary mount

>From: Chris Faylor <cgf AT cygnus DOT com>
>On Mon, Apr 24, 2000 at 02:31:19PM -0400, DJ Delorie wrote:
>>Hey, I've got an idea.  How about a mount mode where files opened for
>>reading do CR/LF conversion *if* they look like text files (i.e. no
>>binary characters, all CR/LF are part of CR/LF pair), and files open
>>for writing always write files in binary mode.

>That's amazing.  I have been thinking about the same thing for several
>days.  I have started to type this in several time but always hit a wall
>when I realized that given the nature of this mailing list, either no one
>would respond or somewone will respond with a twenty page treatise on the
>way they think it should be done with no hint of an effort to volunteer to
>do the actual work.

>I was thinking that if a file had any characters whose ASCII code was
>< ' ' or >= DEL before the first \n, then the file would be considered
>binary.  Otherwise, the file would be text.  You could apply this heuristic
>to both input and output.

This may have been true 15 years ago.....

A file is binary, if it contains non-printable characters. 

As we may have e.g umlauts in 8 bit things have changed.

Jörg

 EMail:joerg AT schily DOT isdn DOT cs DOT tu-berlin DOT de (home) Jörg Schilling D-13353 Berlin
       js AT cs DOT tu-berlin DOT de		(uni)  If you don't have iso-8859-1
       schilling AT fokus DOT gmd DOT de		(work) chars I am J"org Schilling
 URL:  http://www.fokus.gmd.de/usr/schilling   ftp://ftp.fokus.gmd.de/pub/unix

- Raw text -


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