Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 177924 - bad utf-8 handling (aka "!" issue on kmail)
Summary: bad utf-8 handling (aka "!" issue on kmail)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-10 14:17 UTC by Jacopo
Modified: 2007-05-17 10:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Copied the patch from the kmail bug report on the same issue (kopete_utf8_patch.diff,534 bytes, patch)
2007-05-10 14:20 UTC, Jacopo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacopo 2007-05-10 14:17:19 UTC
The password gets corrupted if there is a "!" in it due to poor handling of utf-8 charset. This is exactly the same bug that affected kmail 

Reproducible: Always
Comment 1 Jacopo 2007-05-10 14:20:45 UTC
Created attachment 118750 [details, diff]
Copied the patch from the kmail bug report on the same issue
Comment 2 Jacopo 2007-05-10 14:28:07 UTC
I posted a tentative patch, just copied the patch for kmail; it seems to me that there's no patch (at least on the stable branch) on the portage tree.

Thx

J
Comment 3 Jacopo 2007-05-10 15:36:52 UTC
For some strange reasons the same patch does not work, even if the code is taken from kmail:

/*
 * Function for (en/de)crypting strings for config file, taken from KMail
 * Author: Stefan Taferner <taferner@alpin.or.at>
 */
QString cryptStr(const QString &aStr)
{
        QString result;
        for (unsigned int i = 0; i < aStr.length(); i++)
                result += (aStr[i].unicode() <= 0x21) ? aStr[i] :
                        QChar(0x1001F - aStr[i].unicode());
        return result;
}
Any idea?
Comment 4 Jacopo 2007-05-10 15:40:41 UTC
For some strange reasons the same patch does not work, even if the code is taken from kmail:

/*
 * Function for (en/de)crypting strings for config file, taken from KMail
 * Author: Stefan Taferner <taferner@alpin.or.at>
 */

//this is the already patched code..

QString cryptStr(const QString &aStr)
{
        QString result;
        for (unsigned int i = 0; i < aStr.length(); i++)
                result += (aStr[i].unicode() <= 0x21) ? aStr[i] :
                        QChar(0x1001F - aStr[i].unicode());
        return result;
}


Any ideas?
J
Comment 5 Carsten Lohrke (RETIRED) gentoo-dev 2007-05-17 10:48:32 UTC
Thanks for finding this one Jacopo, upstream even found another case.