Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jul 2010 14:21:22 -0500
From:      David Kelly <dkelly@hiwaay.net>
To:        Chuck Swiger <cswiger@mac.com>
Cc:        FreeBSD-Questions@FreeBSD.org
Subject:   Re: Strip high bit from text?
Message-ID:  <20100722192122.GB49236@Grumpy.DynDNS.org>
In-Reply-To: <E0CF6F76-56F9-42E7-A1C6-7468F1BECCF0@mac.com>
References:  <20100721223445.GA44260@Grumpy.DynDNS.org> <E0CF6F76-56F9-42E7-A1C6-7468F1BECCF0@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 21, 2010 at 04:03:46PM -0700, Chuck Swiger wrote:
> 
> > Already use procmail so adding an automatic filter should not be
> > difficult if only I can come up with on.
> > 
> > Tried "tr \240 ' ' < testfile | hd" and was not able to change the 0xa0
> > into anything. Have already spent much more time trying to make tr or
> > sed do the job than it would have taken to knock something out in C, but
> > I think there should be something laying around already in the base
> > system to perform this task.
> > 
> > Suggestions? Repair the email while procmail has it? Reconfigure mutt and/or vim?
> 
> If you've got procmail in the loop already, then calling iconv  as a filter like so:
> 
>    iconv -f utf-8 -t ascii
> 
> ...is likely to help.  Another choice would be to switch to using a
> MIME+Unicode/UTF-8 aware mail reader.

Am thinking I initially succumbed to the novice goof of not escaping the
backslash in "tr \240 ' ' < testfile | hd". Currently have this in my
procmailrc but haven't seen an example come through. For some reason
today my friend's Blackberry is sending 7bit rather than
quoted-printable. He doesn't know why. 

:0 fW
* ^X-MIME-Autoconverted: from quoted-printable to 8bit
| tr '\240' ' '
	:0 afW
	| formail -I "X-Converted: 0xA0 Stripper"

-- 
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100722192122.GB49236>