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

List:       kde-bugs-dist
Subject:    [Bug 126025] Quoted displaynames are misstreated. When a comma is in
From:       Ingo "Klöcker" <kloecker () kde ! org>
Date:       2006-05-09 13:34:03
Message-ID: 20060509133403.3271.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=126025         




------- Additional Comments From kloecker kde org  2006-05-09 15:34 -------
This is definitely a bug in KMail, even though it's also IMO an abuse of \
RFC2047-encoding which was invented for encoding non-ASCII characters and not for \
encoding commas. The latter is what quoted strings have been invented for in RFC822.

The problem here is that KMail treats RFC2047-encoding more or less as transport \
encoding. All (or at least most) operations are done with the decoded header values. \
This is obviously based on a wrong assumption, namely that the RFC2047-decoder \
transforms a valid email address into a valid email address (except for the fact, \
that it may contain non-ASCII characters). The problem is that the RFC2047 decoder \
doesn't know anything about email address syntax. A possible solution would be to \
extend normalizeAddressesAndDecodeIDNs() (or write a similar function) so that it \
accepts RFC2047 encoded addresses and, during normalization, makes sure the display \
name is correctly quoted, whenever necessary. In fact, normalizedAddress() already \
adds quotes, whenever necessary. So, in normalizeAddressesAndDecodeIDNs() after \
KPIM::splitAddress( (*it).utf8(), displayName, addrSpec, comment ) the RFC2047 \
decoder has to be applied to displayName and comment. Of course, this means that we \
also have to pass the raw, possibly RFC2047-encoded, header value to \
normalizeAddressesAndDecodeIDNs().

(Yes, the correct solution would be to use KMime and it's email address class-tree \
for this, but KMime's email address parser only accepts ASCII-text (IIRC) and throws \
away any comments it encounters, so we can't use it atm.)


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

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