[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] patch: fix minor issue w/NOCONVERT
From: |
Chris Allegretta |
Subject: |
Re: [Nano-devel] patch: fix minor issue w/NOCONVERT |
Date: |
Sat, 15 Feb 2003 19:15:13 -0800 |
User-agent: |
Mutt/1.2.5.1i |
On Thu, Feb 13, 2003 at 11:00:36AM -0800, David Lawrence Ramsey wrote:
> http://pooka_regent.tripod.com/patches/nano/nanoconvert-patch.txt
>
> When nano first reads in a line containing DOS or Mac newline
> characters, it sets fileformat and converts the newline to a Unix
> newline. If a subsequent line has binary characters in it, NOCONVERT
> is set there and no more of the line endings are converted. This is
> problematic, since NOCONVERT is supposed to signify that no line
> endings were converted. Therefore, the following patch makes nano only
> set NOCONVERT if binary characters have been found and fileformat is
> 0. This means that text files containing a few binary characters and
> DOS or Mac newlines are now read properly. (Try opening e.g. a copy of
> GPL 2, with its embedded ^L's, saving it in DOS or Mac format, and
> reopening it to see the difference in behavior.)
Nice, thank you for the patch David. Credited and committed.
Chris A
--
Chris Allegretta http://www.asty.org
"Share and Enjoy" - Douglas Adams, 1952 - 2001