* Re: [9fans] diffs for reading iso-8859-2 emails
@ 2002-09-23 20:21 presotto
0 siblings, 0 replies; 2+ messages in thread
From: presotto @ 2002-09-23 20:21 UTC (permalink / raw)
To: jarai, 9fans
[-- Attachment #1: Type: text/plain, Size: 44 bytes --]
Thanks, I'll make the change to our sources.
[-- Attachment #2: Type: message/rfc822, Size: 2578 bytes --]
From: "Zoltan Jarai" <jarai@mail.tvnet.hu>
To: 9fans@cse.psu.edu
Subject: [9fans] diffs for reading iso-8859-2 emails
Date: Mon, 23 Sep 2002 21:33:37 +0200
Message-ID: <ef6c038f5b951b764d11dfb35320ead4@mail.tvnet.hu>
I made a small change to upas/fs to handle emails encoded in
iso-8859-2, since most people I get mail from, here in Hungary, use
that. I know this is not relevant to most of you but some of you
reading emails in charsets other than ASCII, UTF-8, ISO-8859-1 and
BIG5 might find it useful, too. I had to introduce a new member in
struct Charset to bridge the discrepancy between the naming
conventions of MIME and tcs.
Zoli
term% diff /n/sources/plan9/sys/src/cmd/upas/fs/fs.c /sys/src/cmd/upas/fs/fs.c
1351a1352
> char *tcsname;
1354,1357c1355,1359
< { "us-ascii", 8, 1, },
< { "utf-8", 5, 0, },
< { "iso-8859-1", 10, 1, },
< { "big5", 4, 2, },
---
> { "us-ascii", 8, 1, nil, },
> { "utf-8", 5, 0, nil, },
> { "iso-8859-1", 10, 1, nil, },
> { "iso-8859-2", 10, 2, "8859-2", },
> { "big5", 4, 2, "big5", },
1411c1413
< if(xtoutf(charsets[i].name, &x, decoded, decoded+len) <= 0){
---
> if(xtoutf(charsets[i].tcsname, &x, decoded, decoded+len) <= 0){
term%
term% diff /n/sources/plan9/sys/src/cmd/upas/fs/mbox.c /sys/src/cmd/upas/fs/mbox.c
1068a1069,1077
> } else if(cistrcmp(s_to_c(m->charset), "iso-8859-2") == 0){
> len = xtoutf("8859-2", &x, m->body, m->bend);
> if(len != 0){
> if(m->ballocd)
> free(m->body);
> m->body = x;
> m->bend = x + len;
> m->ballocd = 1;
> }
term%
^ permalink raw reply [flat|nested] 2+ messages in thread
* [9fans] diffs for reading iso-8859-2 emails
@ 2002-09-23 19:33 Zoltan Jarai
0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Jarai @ 2002-09-23 19:33 UTC (permalink / raw)
To: 9fans
I made a small change to upas/fs to handle emails encoded in
iso-8859-2, since most people I get mail from, here in Hungary, use
that. I know this is not relevant to most of you but some of you
reading emails in charsets other than ASCII, UTF-8, ISO-8859-1 and
BIG5 might find it useful, too. I had to introduce a new member in
struct Charset to bridge the discrepancy between the naming
conventions of MIME and tcs.
Zoli
term% diff /n/sources/plan9/sys/src/cmd/upas/fs/fs.c /sys/src/cmd/upas/fs/fs.c
1351a1352
> char *tcsname;
1354,1357c1355,1359
< { "us-ascii", 8, 1, },
< { "utf-8", 5, 0, },
< { "iso-8859-1", 10, 1, },
< { "big5", 4, 2, },
---
> { "us-ascii", 8, 1, nil, },
> { "utf-8", 5, 0, nil, },
> { "iso-8859-1", 10, 1, nil, },
> { "iso-8859-2", 10, 2, "8859-2", },
> { "big5", 4, 2, "big5", },
1411c1413
< if(xtoutf(charsets[i].name, &x, decoded, decoded+len) <= 0){
---
> if(xtoutf(charsets[i].tcsname, &x, decoded, decoded+len) <= 0){
term%
term% diff /n/sources/plan9/sys/src/cmd/upas/fs/mbox.c /sys/src/cmd/upas/fs/mbox.c
1068a1069,1077
> } else if(cistrcmp(s_to_c(m->charset), "iso-8859-2") == 0){
> len = xtoutf("8859-2", &x, m->body, m->bend);
> if(len != 0){
> if(m->ballocd)
> free(m->body);
> m->body = x;
> m->bend = x + len;
> m->ballocd = 1;
> }
term%
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-09-23 20:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-23 20:21 [9fans] diffs for reading iso-8859-2 emails presotto
-- strict thread matches above, loose matches on Subject: below --
2002-09-23 19:33 Zoltan Jarai
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).