From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20001121144412.239EB199E1@mail.cse.psu.edu> Subject: [9fans] problems with marshal Date: Tue, 21 Nov 2000 15:46:15 +0000 Topicbox-Message-UUID: 2e2d0e1a-eac9-11e9-9e20-41e7f4b1d025 i came across a few problems with upas/marshal; i'm afraid i haven't got time to fix all of them right now. most minor problem is that in scanning for 8 bit characters, a "Content-transfer-encoding: 8bit" header can be output several times. that's fixed easily with: diff /n/dump/2000/1121/sys/src/cmd/upas/ned/marshal.c marshal.c 370c370 < for(;;){ --- > while (docontenttype){ 385c385 < if(*p++ & 0x80){ --- > if(*p++ & 0x80 && docontenttype){ (which also saves some buffer space on files containing lots of utf) the other problem is that text attachments containing 8 bit utf don't propagate the "Content-transfer-encoding: 8bit" into the main header. fixing this would require reading all the attachments before spitting out the principal header, which is not currently done. the alternative (which would likely be preferable, as it would make the resulting email smtp compatible) would be to encode any 8-bit plain text attachments in quoted-printable. then i might be able to see the utf chars sent to 9fans! one last thing: diff /n/dump/2000/1121/sys/src/cmd/file.c file.c 345c345 < if (nbuf < 100) --- > if (nbuf < 100 && !mime) which stops "file -m" printing two type lines for short files. cheers, rog.