After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 619347 - Decode QP in email in Contact List Editor
Decode QP in email in Contact List Editor
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Contacts
2.30.x (obsolete)
Other All
: Normal minor
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
: 621762 621812 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-05-22 08:40 UTC by David Ayers
Modified: 2011-05-13 11:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of misrendered address (54.93 KB, image/png)
2010-05-22 08:40 UTC, David Ayers
  Details
Patch candidate (1.78 KB, patch)
2010-05-22 08:43 UTC, David Ayers
committed Details | Review
Screenshot of Contact List Editor when Reopened after creation (25.51 KB, image/png)
2011-04-05 11:40 UTC, Vibha Yadav
  Details
evo patch (904 bytes, patch)
2011-05-13 07:53 UTC, Milan Crha
committed Details | Review

Description David Ayers 2010-05-22 08:40:20 UTC
Created attachment 161708 [details]
Screenshot of misrendered address

The documentation of this method claims to return the formatted name
yet it previously encoded them in quotable strings.

This is causing non-ASCII characters in address names to be displayed as quoted-printables in the UI and expands them as such in the address fields.

I'll try to append a screen shot and a patch which fixes the issue for me.
Comment 1 David Ayers 2010-05-22 08:43:03 UTC
Created attachment 161709 [details] [review]
Patch candidate

This Patch fixed the issue for me:

[PATCH] Return formatted address in e_destination_get_address

The documentation of this method claims to return the formatted name
yet it previously encoded them in quotable strings.  This patch fixes
this which results in strings containing non ASCII characters to be
rendered correctly in the UI.  This also changes the vCard output but
vCard 3.0 specifies that quotable-printable inline ecnodings have been
eliminated.  In any case this quoting should be handled in
e_destination_export_to_vcard_attribute instead.
Comment 2 David Ayers 2010-05-22 08:43:55 UTC
Sorry forgot to add a reference to the downstream bug report:
https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/229187
Comment 3 Matthew Barnes 2010-05-29 22:31:02 UTC
I can't reproduce this problem in Evolution 2.30.  Can you provide more exact reproducer steps, or maybe provide some sample addresses that are causing you problems?
Comment 4 David Ayers 2010-05-30 14:55:22 UTC
1. Create a contact with the name: José Doe <jose@foo.bar>
2. Create a contact list
3. Add the José to the conact list

That leads to the contact list to show the entry:
=?ISO-8859-1?Q?Jos=E9?= Doe <jose@foo.bar>

Please let me know if you need more information.

PS: should I change the status to "UNCONFIRMED" when I add requested information like this?
Comment 5 David Ayers 2010-06-01 07:08:27 UTC
Please let me know if you require an further examples like:

Klaus Müller <kaete.kummer@foo.bar>
Käte Kummer <kaete.kummer@foo.bar>

I'll update the status to unconfirmed just in case that's required for this bug to show up in a filter list.
Comment 6 Matthew Barnes 2010-06-05 22:10:00 UTC
I managed to reproduce this with Evolution 2.30.1.2 on Debian, but not with Evolution 2.30.1.2 on Fedora.  I manage the Fedora evolution package and I keep it as close to upstream as possible, so I know there's no Fedora patches related to this.  That must mean the bug is caused by a Debian patch which Ubuntu copied.  I'll see if I can track it down.
Comment 7 Matthew Barnes 2010-06-05 22:29:42 UTC
Actually I take that last comment back.  I managed to reproduce it in Fedora now.  It fails to display correctly when you autocomplete using the entry in the Members section of the Contact List Editor.  Choosing the contact via the Select button and dragging the contact into the list both work fine.
Comment 8 Matthew Barnes 2010-06-05 23:47:43 UTC
Okay, now that I can reproduce this I can finally verify that your patch works and doesn't appear to cause unwanted side-effects in the rest of the app that I can see.  Sorry this took so long.

Patch committed to master and gnome-2-30 branches:

http://git.gnome.org/browse/evolution-data-server/commit/?id=db8c986c4f06f0cb57de9bfa6982b4e78f0bb32a

http://git.gnome.org/browse/evolution-data-server/commit/?h=gnome-2-30&id=26f8a8a067634837816e01bb6bfc283f3a953453
Comment 9 Sebastien Bacher 2010-06-21 10:16:03 UTC
the change seems to create new issues, we backported it to evolution 2.28 in lucid and get bugs similar to https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/596531 now

"Recipient addresses added from address book are being changed incorrectly after clicking send. The recipient address of these messages in my Outbox are badly formed and cannot be sent correctly.

For example after selecting my address
Mr. Allan John Kelly <allan.kelly@xxxxxxx.net> is correct in my compose message TO address box.

After clicking send, viewing the message in Outbox, the TO bcx now has a reformatted corrupted address where the < symbol has been repositioned incorrectly :
Mr.AllanJ <ohn Kelly allan.kelly@xxxxxxx.net>"
Comment 10 Matthew Barnes 2010-06-21 11:26:38 UTC
e_destination_get_address() is badly documented, but I see now that it -is- intended to return an encoded name and email address suitable for use in an email header.

e_destination_get_textrep() exists for displaying addresses to the user.  It uses camel_address_format().  So the Contact List Editor is at fault for calling the wrong EDestination function.  I'm tempted to rename it something like e_destination_get_display_name() to better clarify its purpose.

I'm reverting the patches in comment #8 and will reinvestigate the Contact List Editor.
Comment 11 Matthew Barnes 2010-06-21 15:01:29 UTC
Fixed properly on the Evolution side:
http://git.gnome.org/browse/evolution/commit/?id=9a8b5041b60bc5136dd21efb2e07b1cb172bce12
Comment 12 David Ayers 2010-06-22 06:50:43 UTC
Thanks!

And sorry for the misleading patch.
Comment 13 Akhil Laddha 2010-09-30 05:36:20 UTC
*** Bug 621812 has been marked as a duplicate of this bug. ***
Comment 14 Akhil Laddha 2010-09-30 05:38:19 UTC
*** Bug 621762 has been marked as a duplicate of this bug. ***
Comment 15 David Ayers 2011-04-01 21:20:35 UTC
Thanks everyone who worked on this but I need to reopen this issue since still exists with all versions of Evolution which I was able to test so far.

That includes:
Lucid 2.28.3-0ubuntu10.2
Maverick 2.30.3-1ubuntu7.3
Natty 2.32.2-0ubuntu4
Fedora 15 Alpha 2.91.6.2

The issue remains that creating a contact list with recipients with non-ASCII characters will expand incorrectly 
a) after this list is saved and reopened and 
b) when the list is used when sending mail.
Comment 16 Vibha Yadav 2011-04-05 11:40:27 UTC
Created attachment 185188 [details]
Screenshot of Contact List Editor when Reopened after creation
Comment 17 Milan Crha 2011-05-13 06:50:38 UTC
The parsing issue mentioned in comment #9 has been fixed within bug #347520. Let's see the rest.
Comment 18 David Ayers 2011-05-13 07:05:06 UTC
Hello Milan,

I'm sure what you mean with "Let's see the rest."

Are you requesting some information that has not been provided?
Or are you announcing that you are starting to look into the issue?

Please let me know if you need more information.

Cheers,
David
Comment 19 Milan Crha 2011-05-13 07:26:18 UTC
I apologize for badly chosen words. I meant to say that I'll look on this and keep this bug updated accordingly.
Comment 20 Milan Crha 2011-05-13 07:53:35 UTC
Created attachment 187755 [details] [review]
evo patch

for evolution;

I managed to reproduce the issue easily, just create few contacts with encoded names (I tried all mentioned here, like quoted printable encoded, then also with a dot inside the name part) and then add then a new contact list. it seems fine, but closing the contact list and reopening makes the difference.

This patch uses same function as the contact preview routine, to decode such address into name and address and then show it to a user, in a human readable form. Sending message to such contact list also works fine.
Comment 21 Milan Crha 2011-05-13 07:57:48 UTC
Created commit 8807321 in evo master (3.1.2+)
Created commit 14bb78b in evo gnome-3-0 (3.0.2+)
Comment 22 David Ayers 2011-05-13 08:29:51 UTC
Thanks a whole lot!  I will try to test this as soon as possible!

Please note that there was the same issue in the expansion of contact lists in mail headers.  Has that also been resolved with this fix or should I open a new report?
Comment 23 Milan Crha 2011-05-13 11:28:20 UTC
(In reply to comment #22)
> Please note that there was the same issue in the expansion of contact lists in
> mail headers.  Has that also been resolved with this fix or should I open a new
> report?

Mine 3.1.1 works fine with respect of sending to such list, as I wrote at the end of comment #20.