From owner-freebsd-questions@FreeBSD.ORG Thu Jul 22 19:21:28 2010 Return-Path: Delivered-To: FreeBSD-Questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3C591065687 for ; Thu, 22 Jul 2010 19:21:28 +0000 (UTC) (envelope-from dkelly@Grumpy.DynDNS.org) Received: from amavis-smtp.knology.net (amavis-smtp.knology.net [75.76.199.6]) by mx1.freebsd.org (Postfix) with ESMTP id BB5F88FC15 for ; Thu, 22 Jul 2010 19:21:28 +0000 (UTC) Received: from localhost (amavis-smtp [127.0.0.1]) by amavis-smtp.knology.net (Postfix) with ESMTP id 4648F8881E; Thu, 22 Jul 2010 15:21:26 -0400 (EDT) Received: from smtp12.knology.net ([75.76.199.9]) by localhost (amavis-smtp.knology.net [75.76.199.6]) (amavisd-new, port 10024) with LMTP id 2nINQmzLtjfK; Thu, 22 Jul 2010 15:21:24 -0400 (EDT) Received: from Grumpy.DynDNS.org (unknown [24.42.224.110]) by smtp12.knology.net (Postfix) with ESMTP id 309D75200023; Thu, 22 Jul 2010 15:21:15 -0400 (EDT) Received: by Grumpy.DynDNS.org (Postfix, from userid 928) id 2B07E2841F; Thu, 22 Jul 2010 14:21:22 -0500 (CDT) Date: Thu, 22 Jul 2010 14:21:22 -0500 From: David Kelly To: Chuck Swiger Message-ID: <20100722192122.GB49236@Grumpy.DynDNS.org> References: <20100721223445.GA44260@Grumpy.DynDNS.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: FreeBSD-Questions@FreeBSD.org Subject: Re: Strip high bit from text? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 19:21:29 -0000 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.