Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: (Re-)coding problems forwarding calendar attachment
Date: Thu, 23 Aug 2007 13:42:23 +0900	[thread overview]
Message-ID: <b4mr6lu7tg0.fsf@jpl.org> (raw)
In-Reply-To: <87d4xfenht.fsf@obelix.mork.no>

>>>>> Bjørn Mork wrote:

> I have problems forwarding calendar attachments using a current CVS
> Gnus.

> I don't really know if this posting will survive since I'm posting it
> using Gnus, but I'm trying to force it to 8bit latin1 (knowing that
> there are really utf-8 characters embedded within this article).

Maybe it survived, if the changes that I made in the CVS trunk
solve your problem. ;-)

> This is how the original Microsoft generated blob looks like:

> ------_=_NextPart_001_01C7E4B1.D35AB8EB
> Content-Type: text/calendar; method=REQUEST; name="meeting.ics"
> Content-Transfer-Encoding: 8bit
> Content-class: urn:content-classes:calendarmessage

[...]

> So they are using
>  - 8bit encoding,
>  - mime-type text/calendar,
>  - default charset,
>  - vCalendar version 2.0

> This all looks good to me.  According to RFC2445, the default charset
> for an iCalendar object is UTF-8, and the text within the object looks
> like valid UTF-8 to me.

I've modified Gnus so as to use UTF-8 by default for decoding
text/calender parts.

> If I try to forward a mail like this, Gnus will recode the attachment
> using it's own defaults:

>  - quoted-printable encoding,
>  - mime-type text/calendar,
>  - charset utf-8,
>  - vCalendar version 2.0

> But when sendting it I get the annoying question

>  "Non-printable characters found.  Continue sending? (d, r, i, e, ?)"

> and even if I answer "i" to ignore, the contents
> is changed resulting in invalid UTF-8:

It is because Gnus doesn't decode the text/calendar part since
Gnus doesn't know the default charset for it, and inserts raw
UTF-8 data in the message buffer.

[...]

> If I try to forward a raw copy of the mail with the attachment (C-u 2
> C-c C-f), I get the mime-headers unchanged as expected.

(You don't need `C-u' in Gnus buffers; just type `2 C-c C-f'.)

Now you can simply use `C-c C-f' and Gnus will not make such a
question.  Even if you have to use `2 C-c C-f' in order not to
re-encode the text/calendar part, you will not be prompted for a
question now.  Or is it better that Gnus always uses the raw
form for text/calendar parts regardless of the prefix argument?

> But I get the same annoying question and the contents is still
> changed adding a "Ã" in front of the UTF-8 multibyte characters
> resulting in invalid UTF-8:

This is due to a bug in mml.el.



  reply	other threads:[~2007-08-23  4:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-22 12:56 Bjørn Mork
2007-08-23  4:42 ` Katsumi Yamaoka [this message]
2007-08-23 15:27   ` Bjørn Mork
2007-08-24 10:22     ` Katsumi Yamaoka

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=b4mr6lu7tg0.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /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).