Subject: [lemonade] CONVERT draft and headers

From: Peter Coates <[email-masked]>
Date: Tue, 11 Dec 2007 16:41:13 -0800

The CONVERT command gives clients with knowledge only of UTF-8 the ability
to retrieve text message parts converted into UTF-8.  But there is no
mechanism for such clients to ask the server to deal with headers with weird
encoded words.  I propose that the CONVERT command be augmented so that
commands of the form

Xa convert 83 (NIL) body[header]

Xb convert 83 (NIL) body[1.header]

Have the expected result of returning the requested headers with encoded
words replace with utf-8 encoded words.

We could go further as support

Xc convert 83 (NIL (charset foo)) body[header]

But I see little point.

WHY, you ask, am I suggestion replacing weird encoded words with UTF-8
encoded words rather than just returning the headers in UTF-8.  Well, the
answer is that encoded words occur in structured headers, and act as a
quoting mechanism.  It is hideously difficult to requite such a string
correctly.  Things like addresses in To: headers still need to be teased
apart by clients, so the output of the convert has to be parsable.

Please comment.  The requirement to convert headers is obvious.  That this
is a solution is clear.  That it is the best solution is not yet clear to me
(although I have implemented it).

Peter

_______________________________________________
lemonade mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/lemonade
Supplemental Web Site:
http://www.standardstrack.com/ietf/lemonade

---

From: Alexey Melnikov <[email-masked]>
Date: Mon, 17 Dec 2007 19:53:01 +0000

Peter,
We've already reached an agreement on this during our private 
discussion, the following reply is mostly for the sake of other WG 
participants.

Peter Coates wrote:

> The CONVERT command gives clients with knowledge only of UTF-8 the 
> ability to retrieve text message parts converted into UTF-8.  But 
> there is no mechanism for such clients to ask the server to deal with 
> headers with weird encoded words.  I propose that the CONVERT command 
> be augmented so that commands of the form
>
>  
>
> Have the expected result of returning the requested headers with 
> encoded words replace with utf-8 encoded words.
>
>  
>
> encoded words rather than just returning the headers in UTF-8.  Well, 
> the answer is that encoded words occur in structured headers, and act 
> as a quoting mechanism.  It is hideously difficult to requite such a 
> string correctly.  Things like addresses in To: headers still need to 
> be teased apart by clients, so the output of the convert has to be 
> parsable.
>
While I am not entirely happy that the result needs to be re-encoded 
using encoded words (as this would still require that Lemonade clients 
understand RFC 2047), the only other alternative is to reference EAI 
work. However EAI message format is going to be experimental and we will 
have some practical difficulties normatively referencing an Experimental 
document from a Standard Track document.  

> Please comment.  The requirement to convert headers is obvious.  That 
> this is a solution is clear.  That it is the best solution is not yet 
> clear to me (although I have implemented it).
>

---

From: Peter Coates <[email-masked]>
Date: Mon, 17 Dec 2007 11:59:09 -0800

The proposed new forms of the convert command are actually more like

1 convert 83 (NIL (charset "utf-8")) body[header] 
1 convert 83 (NIL (charset "utf-8")) body[1.header] 
1 convert 83 (NIL (charset "utf-8")) body[1.mime]

Peter

-----Original Message-----
From: Alexey Melnikov [mailto:[email-masked]] 
Sent: December 17, 2007 11:53
To: Peter Coates
Cc: [email-masked]
Subject: Re: [lemonade] CONVERT draft and headers

Peter,