9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: [9fans] problems with marshal
Date: Tue, 21 Nov 2000 15:46:15 +0000	[thread overview]
Message-ID: <20001121144412.239EB199E1@mail.cse.psu.edu> (raw)

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.



             reply	other threads:[~2000-11-21 15:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-21 15:46 rog [this message]
2000-11-21 15:20 ` Boyd Roberts
2000-11-21 16:54 rog
2000-11-21 17:30 presotto
2000-11-21 17:31 presotto
2000-11-21 17:47 ` Alex Bochannek
2000-11-21 18:47 rog
2000-11-21 18:23 ` Boyd Roberts
2000-11-23 10:17   ` Lyndon Nerenberg
2000-11-23 19:26     ` Boyd Roberts
2000-11-23 20:57 rob pike
2000-11-23 21:49 ` Boyd Roberts
2000-11-24 10:09 ` Lyndon Nerenberg
2000-11-23 21:29 forsyth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001121144412.239EB199E1@mail.cse.psu.edu \
    --to=rog@vitanuova.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).