[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: [RFC] How to handle URLs in KMail
From:       Marc Mutz <mutz () kde ! org>
Date:       2002-09-30 20:31:48
[Download RAW message or body]

On Monday 30 September 2002 01:23, Ingo Klöcker wrote:
<snip>
> the way we currently handle URLs in KMail is at best completely
> broken. Most of the time the mailto: URLs which we generate work
> correctly. But this is because we all have latin1-encodable names.
> The URLs break when the email addresses (or other URLs) contain
> characters which have a special meaning in URLs like '#' or '%'
> (http://bugs.kde.org/show_bug.cgi?id=47981). Furthermore they don't
> work at all with non-latin1-encoded names.
<snip>
> So we have to come up with a better solution for encoding arbitrary
> Unicode strings as URLs. Does anybody know which RFC deals with this
> and whether we already have a corresponding codec in kdelibs or
> whereever?

rfc 2368: The mailto URL scheme (proposed std; updates 1738)
rfc 2396: Uniform Rescource Identifiers (URI): Generic Syntax
(draft std)
rfc 1738: Uniform Resource Locators (URL) (proposed std).
rfc 1808: Relative Uniform Resource Locators (prop. std)
rfc 2141: URN syntax (proposed std)

rfc 2368:

2. Syntax of a mailto URL

   Following the syntax conventions of RFC 1738 [RFC1738], a "mailto"
   URL has the form:

     mailtoURL  =  "mailto:" [ to ] [ headers ]
     to         =  #mailbox
     headers    =  "?" header *( "&" header )
     header     =  hname "=" hvalue
     hname      =  *urlc
     hvalue     =  *urlc

   "#mailbox" is as specified in RFC 822 [RFC822]. This means that it
   consists of zero or more comma-separated mail addresses, possibly
   including "phrase" and "comment" components. Note that all URL
   reserved characters in "to" must be encoded: in particular,
   parentheses, commas, and the percent sign ("%"), which commonly occur
   in the "mailbox" syntax.

   "hname" and "hvalue" are encodings of an RFC 822 header name and
   value, respectively. As with "to", all URL reserved characters must
   be encoded.

   The special hname "body" indicates that the associated hvalue is the
   body of the message. The "body" hname should contain the content for
   the first text/plain body part of the message. The mailto URL is
   primarily intended for generation of short text messages that are
   actually the content of automatic processing (such as "subscribe"
   messages for mailing lists), not general MIME bodies.

   Within mailto URLs, the characters "?", "=", "&" are reserved.

   Because the "&" (ampersand) character is reserved in HTML, any mailto
   URL which contains an ampersand must be spelled differently in HTML
   than in other contexts.  A mailto URL which appears in an HTML
   document must use "&amp;" instead of "&".

   Also note that it is legal to specify both "to" and an "hname" whose
   value is "to". That is,

     mailto:addr1%2C%20addr2

     is equivalent to

     mailto:?to=addr1%2C%20addr2

     is equivalent to

     mailto:addr1?to=addr2

   8-bit characters in mailto URLs are forbidden. MIME encoded words (as
   defined in [RFC2047]) are permitted in header values, but not for any
   part of a "body" hname.



-- 
Eternal vigilance is the price of liberty   -- Thomas Jefferson

[Attachment #3 (application/pgp-signature)]
_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic