[Top] [All Lists]

Re: cleartext signatures - trailing white space - proposal

2004-03-12 08:00:05

On Fri, 12 Mar 2004 08:31:16 -0500, Ian Grigg said:

I think there is a difference between whitespace and
line endings, as far as OpenPGP cleartext signatures
are concerned, at least.

Yes, but LF is also often used as a whitespace character.

The issue comes when you get files that are garbled
in their line endings:

    line< ><CR><CR><LF>

Our lineending is <CR><LF> and thus I would remove the space and the
first <CR>.


    line<CR> <LF><CR><LF>

It is easier for systems where the line ending is just one character
;-) In practise most systems do that and use LF (is it CR on Macs?).

coding up that sort of thing, I've adopted the strategy
of saying that any change in the nature of the line
endings is treated immediately as a panic (caller to

However we are talking about what we need to hash and we explicitly
want to convert the line for this purposes - that is what textmode is

In sum, I'm not sure that we want to define whitespace
in this immediate context as including the legal line
ending characters...  Comments?

1. Determine the length of the line (according to the convention of
   the system the application runs).  
2. Trim trailing whitespace;  including CR and LF.
3. Append CR,LF
4. Hash the line

these characters VT, FF, have defined meaning within
the text than are likely to be added later by
transmission gremlins.


I know we don't need it, but without an explicit
mention of Unicode, I suspect there will be a
an endless stream of questions, and also, people

Okay, so lets add it.