From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: "Steve Simon" Date: Wed, 2 Feb 2005 15:43:22 +0000 To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] umlaut Topicbox-Message-UUID: 3c93a3ce-eace-11e9-9e20-41e7f4b1d025 mail -s umlaut 9fans Isn't the 'problem' that you are reading the rawunix headers which don't honour the mime character set encoding, and then processing them with sed which assumes its input is utf8? There are many solutions to this, most are ugly (use ape's sed) or a load of work (upas/fs to support a cookedunix file). My prefered solution is to replace sed with a trivial c prog in pipeto.lib: /* * upas/padfrom - prevent upas/fs from miss interpreting * the work From in email messages */ #include #include #include main() { char *p; Biobuf bi, bo; Binit(&bi, 0, OREAD); Binit(&bo, 1, OWRITE); while ((p = Brdline(&bi, '\n')) != nil && Blinelen(&bi) > 1) Bwrite(&bo, p, Blinelen(&bi)); while ((p = Brdline(&bi, '\n')) != nil){ if (strncmp(p, "From ", 5) == 0) Bputc(&bo, ' '); Bwrite(&bo, p, Blinelen(&bi)); } }