|
From: | Erwin Waterlander |
Subject: | Re: dos2unix treatment of formfeeds |
Date: | Sun, 21 Nov 2010 10:14:52 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 6.0; nl; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 |
Ben Pfaff schreef, Op 20-11-2010 5:34:
Hi. Harry Thijssen, a user of GNU PSPP (software that I maintain), wrote to me that dos2unix reported that some of the text files included with PSPP are binary instead of text. I took a look at the problem and discovered that dos2unix treats the ASCII FF (formfeed) character as an indication that a file is binary. Formfeeds are fairly common in GNU software because of the following paragraph in the GNU coding standards: Please use formfeed characters (control-L) to divide the program into pages at logical places (but not within a function). It does not matter just how long the pages are, since they do not have to fit on a printed page. The formfeeds should appear alone on lines by themselves. I'm appending a patch that changes dos2unix to consider formfeeds a valid character in text files. I hope that you will consider applying it or an equivalent in an upcoming dos2unix release. Thanks, Ben.
Hi Ben,I have seen this too a few times, but I didn't know that form feeds are part of GNU coding standards. I assumed that use of form feed control characters is not common, so I took no risk and didn't make an exception for form feeds. There is always the option -f to force conversion.
I include your patch in the next dos2unix version. I don't think there is a big risk that a binary file is accidentally seen as text file with this extra exception. Is it OK to mention your name and/or email address in the ChangeLog? Thanks for the patch.
best regards, -- Erwin Waterlander http://www.xs4all.nl/~waterlan/
[Prev in Thread] | Current Thread | [Next in Thread] |