On Mon, 10 Mar 2003 11:51:43 +0100, Dominikus Scherkl said:
- at least in german this is common - and how can a parser find
out if the "- " in the above line is intentional? or that in the next?
It does not need to. There are 2 ways to convert dash escaped text:
1. Look for a line starting with a dash and check whether the next
character is a space. If it is not a space bail out with an
error: "not an OpenPGP conform message"
2. Look for a line starting with a dash and a space (or end-of-line)
and remove it; copy verbatim in all other cases.
Of course, this should only be done while in a -----BEGIN/END section.
The second approach is the simplest and what most applications do.
- From all solutions I prefer not to allow escaping other then
those starting with "-" or "From" - it simply works, and I think
This requires extra logic and a 6 byte look-ahead (" From ") and you
gain nothing by it. With the straighforward approach you can simple
sed the dash escaped text.
KISS.
Shalom-Salam,
Werner