Hi!!!
Why these nul characters appear?
Alexandre dos Santos
Philip Guenther wrote:
dattier(_at_)wwa(_dot_)com (David W. Tamkin) writes:
Timothy Luoma asked,
| Is there any way to detect NULLs using procmail, and possibly convert them
| to something else or simply delete them?
Just to pick nits, the character with code zero is officially called
NUL, not NULL.
Procmail can handle nulls; the problem is that your editor may be unable to
insert a null into your .procmailrc.
A condition to detect the presence of a null, if you can edit a null into
your .procmailrc, is easy enough to write:
* HB ?? ^@
Actually, this doesn't work: the nul is interpreted as the end of the
line when the regexp engine sees it, so the above condition will always
match. Procmail can handle nuls in the e-mail message, but not in a
.procmailrc.
[where ^@ is an actual null, not caret-at]. If your editor allows you to
enter a character #255 but not a null, you can do this:
* HB ?? [^A-\255]
where ^A is a ctrl-A [not caret-A] and \255 is an actual character #255 (not
backslash-2-5-5).
Whoops, you left out the real caret. That's supposed to be a inverted
character class, so it should be
* HB ?? [^^A-\255]
Open bracket, caret, control-A, minus, character 255, close bracket.
Philip Guenther