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 324604 - Non-ascii characters generate trash in address lists
Non-ascii characters generate trash in address lists
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Contacts
2.12.x
Other other
: Normal major
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
: 261457 332665 355365 355731 422553 458907 493620 493651 512010 520260 (view as bug list)
Depends on:
Blocks: Persian
 
 
Reported: 2005-12-20 12:41 UTC by irios
Modified: 2013-09-13 00:58 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Patch for solving problem related to i18n text in contacts (2.07 KB, patch)
2006-09-25 15:37 UTC, makuchaku (Mayank)
none Details | Review
Patch for list preview (5.93 KB, patch)
2006-10-03 11:36 UTC, makuchaku (Mayank)
none Details | Review
patch for enabling display of i18n mail ID's in the addressbook (11.17 KB, patch)
2006-10-06 07:54 UTC, makuchaku (Mayank)
none Details | Review
new patch as per guidelines - for evo (11.18 KB, patch)
2006-10-06 08:46 UTC, makuchaku (Mayank)
none Details | Review
Modified patch (11.13 KB, patch)
2006-10-09 06:38 UTC, makuchaku (Mayank)
needs-work Details | Review
updated Mayank's patch (7.29 KB, patch)
2008-01-14 15:57 UTC, Milan Crha
accepted-commit_now Details | Review
proposed evo patch (11.96 KB, patch)
2008-01-15 13:40 UTC, Milan Crha
reviewed Details | Review
proposed evo patch ][ (14.85 KB, patch)
2008-01-18 16:06 UTC, Milan Crha
committed Details | Review

Description irios 2005-12-20 12:41:51 UTC
From: irios <irios@proin.es>
To: submit@bugs.gnome.org
X-Mailer: bug-buddy 2.12.1
Subject: Non-ascii characters generate trash in address lists

Distribution: Ubuntu 5.10 (breezy)
Package: Evolution
Severity: Normal
Version: GNOME2.12.1 unspecified
Gnome-Distributor: Ubuntu
Synopsis: Non-ascii characters generate trash in address lists
Bugzilla-Product: Evolution
Bugzilla-Component: Contacts [was: Addressbook]
Bugzilla-Version: unspecified
Description:
Description of Problem:

Non-ascii characters in a name in the address book appear jumbled in
certain fields.

How it happens:

I have names in my agenda with non-ascii chars, such as:

	Guillermo Fernández Gª-Rojo
	Magüi Miño

I input them in the adress book, and everything looks fine.

I write a new email for them.

I click on the "Para" (TO, I guess) button and I get a window where I
can select addressees. All my contacts appear (looking fine) in the left
panel titled "Contactos". I click on Magüi Miño, and she is
highlighted.

I click on the "Añadir" ("Add", I guess) button beside the panel titled
"Para". Junk appears on the panel titled "Para". It reads:
"=?ISO-8859-1?Q?Mag=FCi_Mi=F1o?=<mminho@telefonica.net>"

I click on "Cerrar" ("Close"), and go back to the email window. The
"Para" field reads "Magüi Miño", which is OK. I send the email. She
receives it.

I want to add Magüi to my friends list. This list already featured
"Andrés Pascual" and "Fernando García".

I select the business card view; individual addresses look fine, but the
list looks already jumbled. I add Magüi. More junk appears on the card
view.

I want to send a message to the list: I right-click on it and select
"Send Message", and a new email window appears; the "To" field is full
of junk. I send the message nonetheless; everybody gets it. I view the
sent message in the "Sent" folder; It looks fine.





------- Bug created by bug-buddy at 2005-12-20 12:41 -------


Bugreport had an attachment. This cannot be imported to Bugzilla.
Contact bugmaster@gnome.org if you are willing to write a patch for this.

Comment 1 André Klapper 2006-02-19 03:13:40 UTC
also see bug 261457
Comment 2 André Klapper 2006-02-27 18:35:36 UTC
marking bug 332665 as a duplicate of this one, adding the same dependency.
Comment 3 André Klapper 2006-02-27 18:35:37 UTC
*** Bug 332665 has been marked as a duplicate of this bug. ***
Comment 4 André Klapper 2006-06-22 13:38:57 UTC
see http://bugzilla.gnome.org/attachment.cgi?id=67834&action=view for a screenshot.
Comment 5 André Klapper 2006-09-11 13:01:15 UTC
*** Bug 355365 has been marked as a duplicate of this bug. ***
Comment 6 André Klapper 2006-09-13 10:38:59 UTC
*** Bug 355731 has been marked as a duplicate of this bug. ***
Comment 7 makuchaku (Mayank) 2006-09-19 09:31:31 UTC
Downstream bug https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=203058
Comment 8 makuchaku (Mayank) 2006-09-25 12:21:21 UTC
Exact reason of bug...

contact_column_formatter - does correct rendering because it generates the names
which are added to the GtkTreeView by using g_strdup_printf

destination_column_formatter - does NOT works because it generates the names
(which are added to destination GtkTreeView) bu using e_destination_get_address
function, which in turn uses camel_address_encode (or internet_encode) to mess
up the encoding of names.

Hence, IMHO this bug can be fixed from two viewpoints...

1) Either continue the method used in contact_column_formatter - ie, use
g_strdup_printf to create the addresses.
2) or modify Camel's internet_encode function to return with proper encoding &
hence a viable address which can be added to the destination box.

Andre: please change the component to evolution-data-server. Also, can you please request a Camel developer to have a look at this.

Thanks,
Mayank

Comment 9 makuchaku (Mayank) 2006-09-25 12:28:04 UTC
The function that does the final blow... camel_header_encode_phrase
Comment 10 makuchaku (Mayank) 2006-09-25 15:37:26 UTC
Created attachment 73375 [details] [review]
Patch for solving problem related to i18n text in contacts

I modelled destination_column_formatter on the basis of how
contact_column_formatter is implemented.
Comment 11 André Klapper 2006-09-27 10:58:56 UTC
makuchaku, your patch fixes the wrong display in the "contact list selector" dialog and in the "press To:-button in composer" dialog.
it does not fix the wrong display in the preview pane and in the address cards view (also see bug 261457 and especially http://bugzilla.gnome.org/attachment.cgi?id=67834&action=view ).

anyway, it's much better than before, though not totally fixed. :-) 
Comment 12 makuchaku (Mayank) 2006-09-27 11:32:21 UTC
I agree Andre. I was working on the preview pane part.

Can we please file a new bug for that & close this one with fixed "To:" button functionality? Or should we continue in the same bug for both?

IMHO, the fix for preview pane would be in evo & for the "To" button was in e-d-s.

What say Andre?
Comment 13 makuchaku (Mayank) 2006-09-27 14:12:38 UTC
One straight forward way to solve this bug would have been to implement 

case EVC_ENCODING_QP:
			g_warning ("need to implement quoted printable decoding");
			break;

in function 
GList*
e_vcard_attribute_get_values_decoded (EVCardAttribute *attr)


Comment 14 makuchaku (Mayank) 2006-10-03 11:36:55 UTC
Created attachment 73936 [details] [review]
Patch for list preview

Patch for solving list preview trash generation poblem - should go in evolution
Comment 15 makuchaku (Mayank) 2006-10-03 11:38:14 UTC
Andre, since the patch in #10 was for e-d-s & the patch in #14 is for evo, shouldnt the bug be broken for e-d-s & evo?

Thanks,
Mayank
Comment 16 makuchaku (Mayank) 2006-10-05 07:09:51 UTC
Bug bifurcated for e-d-s 
http://bugzilla.gnome.org/show_bug.cgi?id=359806

Patch in c#10 goes to bug 359806
Comment 17 makuchaku (Mayank) 2006-10-06 07:54:46 UTC
Created attachment 74117 [details] [review]
patch for enabling display of i18n mail ID's in the addressbook

This patch goes ito evo.
Comment 18 makuchaku (Mayank) 2006-10-06 08:46:57 UTC
Created attachment 74120 [details] [review]
new patch as per guidelines - for evo

patch for enabling display of i18n mail ID's in the addressbook
Comment 19 makuchaku (Mayank) 2006-10-09 06:38:06 UTC
Created attachment 74329 [details] [review]
Modified patch
Comment 20 André Klapper 2006-12-21 22:57:02 UTC
*** Bug 261457 has been marked as a duplicate of this bug. ***
Comment 21 André Klapper 2007-03-29 16:47:46 UTC
*** Bug 422553 has been marked as a duplicate of this bug. ***
Comment 22 Srinivasa Ragavan 2007-05-12 10:13:42 UTC
Matthew, Can you look at Makuchaku's patch?
Comment 23 André Klapper 2007-05-15 16:04:16 UTC
still an issue in 2.11 - the preview pane part is fixed, but not the selector part and the contacts list pane part.
Comment 24 Srinivasa Ragavan 2007-07-06 19:34:10 UTC
The patch looks fine. It fails to apply to trunk. Makuchaku/Matthew can one of you give an updated patch?
Comment 25 André Klapper 2007-07-21 18:14:32 UTC
*** Bug 458907 has been marked as a duplicate of this bug. ***
Comment 26 Srinivasa Ragavan 2007-08-13 07:58:49 UTC
Matthew/Milan ?
Comment 27 Milan Crha 2007-09-03 12:44:38 UTC
I reworked it to be compilable with actual evo sources, but it doesn't work for other than UTF-8 encoding, so the example from comment #0 doesn't work. I can see it worked in the upper contacts list, but not in the bottom preview. I will try to rework it. Feel free to commit the i18n patch, srag.
Comment 28 André Klapper 2007-11-05 06:58:06 UTC
*** Bug 493620 has been marked as a duplicate of this bug. ***
Comment 29 André Klapper 2007-11-05 13:09:37 UTC
*** Bug 493651 has been marked as a duplicate of this bug. ***
Comment 30 Suman Manjunath 2008-01-14 10:49:51 UTC
Milan, the i18n patch fails to apply on SVN trunk. If you have a re-worked patch, please attach it to the bug. 

marking approved patch as obsolete since it fails to apply on SVN trunk - too many changes since the patch was made..  
Comment 31 Milan Crha 2008-01-14 15:57:40 UTC
Created attachment 102826 [details] [review]
updated Mayank's patch

Here's an updated Mayank's patch, slightly modified. There is one thing, I guess we can omit parse_qp_email function in case we can call a camel functions from Address book. If we can, then it will be better to use such already existed function which also supports other types of encodings, not only the UTF-8.

So please reconsider the usage of this patch.
Comment 32 Srinivasa Ragavan 2008-01-14 20:13:45 UTC
Milan, we can call camel. But it will be like link the lib just for that one function. Again, it may not be efficient IMO. Here we can duplicate the functionality with a fixme. At later point, when we do need Camel for something core, we can fix everything. 

I haven't tested now Milan. Just test and commit.
Comment 33 Milan Crha 2008-01-15 13:40:38 UTC
Created attachment 102896 [details] [review]
proposed evo patch

for evolution;

I did test it and I realized the patch isn't complete and after a little discussion on IRC that that will be better to call camel function to decode, to support as many locales as camel, without duplicating code (btw, the address book already links camel, so no change in configure.in (I didn't know that)).

There is only one thing I'm not sure about, and that is my change in addressbook/gui/widgets/e-addressbook-table-adapter.c
I saw similar approach in message-list.c, but I'm not sure if it will be working or not here. I mean, if it leaks or not after my change.
Comment 34 Srinivasa Ragavan 2008-01-16 06:46:55 UTC
Oh addressbook links camel? I didnt knew it. It looks fine. But yes you are right. Your patch leaks memory at the place where you mentioned. Hmm, you could have a strings hash table or so where you can manipulate this and free it at the end. With the hastable you can also void repeated decoding. It would decode the viewed/visible entries for every repaint.
Comment 35 Milan Crha 2008-01-18 16:06:04 UTC
Created attachment 103148 [details] [review]
proposed evo patch ][

for evolution;

It's almost same as the previous patch, few little tinnies I found during some little tests and solved leaking issue mentioned above.
Comment 36 Srinivasa Ragavan 2008-01-20 11:53:24 UTC
Milan, looks fine to me. Just test and commit to trunk asap, so that it can have a week of testing before 2.21.90
Comment 37 Milan Crha 2008-01-21 10:22:07 UTC
Committed to trunk. Committed revision 34863.
Comment 38 André Klapper 2008-01-25 13:52:16 UTC
*** Bug 512010 has been marked as a duplicate of this bug. ***
Comment 39 André Klapper 2008-03-04 10:29:03 UTC
*** Bug 520260 has been marked as a duplicate of this bug. ***