On Monday, Mar 10, 2003, at 05:51 US/Eastern, Dominikus Scherkl wrote:
I don't see how there would be a problem in reversing the
transformation.
- bullet point
becomes
- - bullet point
and reverses back to
- bullet point
random text
becomes
- random text
and reverses back to
random text
MAY means: arbitrary lines may get a dash-escape, others do not.
so how do you manage to recognise which leading "- " were there
before encoding and which were not, without looking at the
following text?
The spec also states that all lines starting with "-" are escaped
unconditionally. Which means that any armored line starting with a "- "
is an escaped line because it cannot be a non-escaped line. And thus
can be stripped off its "- " prefix without looking at the following
text.
Now this is easy: a sequence "- -" becomes "-" and "- From" becomes
"From", anything else is left unchanged.
But if any other lines MAY be escaped, looking at the context
doesn't help any more. Dashes are used also to mark insertions
- 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?
- From all solutions I prefer not to allow escaping other then
It doesn't have to. Your example will always be translated to:
- - 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?
- - From all solutions I prefer not to allow escaping other then
and thus can be unescaped unambiguously.
Allowing every line to be escaped yields a simpler unescaping
algorithm. Simplicity is a selling point when security is concerned. It
is also compatible with PGP behaviour dating back to God knows when and
thus will not cause any problems that are not already apparent in PGP.
Cheers,
-J