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 322125 - quoted-printable not decoded correctly
quoted-printable not decoded correctly
Status: RESOLVED DUPLICATE of bug 320237
Product: evolution-data-server
Classification: Platform
Component: Contacts
1.6.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks: 327516
 
 
Reported: 2005-11-22 12:31 UTC by Daniel Holbach
Modified: 2013-09-14 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
decoding of quoted-printable encoded strings (922 bytes, patch)
2005-11-22 12:33 UTC, Daniel Holbach
none Details | Review

Description Daniel Holbach 2005-11-22 12:31:43 UTC
Version details: 1.5.2
Distribution/Version: Ubuntu Dapper

Forwarded from: http://bugzilla.ubuntu.com/show_bug.cgi?id=18040

In the evolution-data-server package is a bug in the decoding of
quoted-printable encoded strings in vcards.


UTF-8 characters are in QUOTED-PRINTABLE encoded as =XX=XX where XX is a byte of
8 bits.

Zürich is encoded as Z=C3=BCrich

If we have a ü (=C3=BC) then:

                        else if (isxdigit(a) && isxdigit (b)) {

// a is 'C' and b is '3'

                                gunichar c;

// gunichar is wrong, because we have 0xC3 whats only 8 bits: char c;

                                a = tolower (a);
                                b = tolower (b);

                                c = (((a>='a'?a-'a'+10:a-'0')&0x0f) << 4)
                                        | ((b>='a'?b-'a'+10:b-'0')&0x0f);

                                g_string_append_unichar (str, c);

// we have to append only a 8 bit char not a 16 bit unichar. 
// -> the next 8 bits 0xBC are added at the next iteration of the while loop.

                        }
Comment 1 Daniel Holbach 2005-11-22 12:33:16 UTC
Created attachment 55075 [details] [review]
decoding of quoted-printable encoded strings
Comment 2 Daniel Holbach 2005-11-22 12:33:59 UTC
Comment on attachment 55075 [details] [review]
decoding of quoted-printable encoded strings

patch by  Felix Egli <felix.egli@goldnet.ch>
Comment 3 André Klapper 2005-12-06 00:31:23 UTC
also see bug 320237; confirming
Comment 4 André Klapper 2006-05-31 12:09:39 UTC
same patch, so marking as duplicate.

*** This bug has been marked as a duplicate of 320237 ***