procmail
[Top] [All Lists]

Re: PCs and ISO-Latin-1

2000-09-07 12:11:01
Ralph asked,

|       When I get e-mail that comes from PCs, it does come across as
| 8-bit ISO-Latin-1.  Unfortunately, the PC folk use a different quote
| character which prints out as octal 222, rather than ' .
| 
|       I know that this is pretty easy to massage, but has anybody
| already done this?  There are possibly other characters that cause
| problems. 

A filter through tr would fix it:

  :0bfw
  | tr \\222 \'

The only difficulty is that if you edit your .procmailrc with an editor
that allows entering the high-bit character, you can put a condition on
the recipe to run it only when the character is present, like this:

 :0Bbfw
 * enter-a-true-octal-222-here
 | tr \\222 \'

Otherwise you'll need to run the recipe unconditionally on all mail, even
when it is not needed.  Procmail's egrep does not recognize octal escapes.
I guess you could do this to cut down on the number of runs: it will limit
the action to messages where the body contains a character that is null,
DEL, or eight-bit:

 # first caret is real; second caret and A should be ctrl-A
 #  when you actually type it into your rcfile
 :0Bbfw
 * [^^A-~]
 | tr \\221\\222\\222 \"\'\"


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>