Summary: | wrong encoding of command line arguments | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | Choe Hwanjin <hjchoe> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Choe Hwanjin
2003-03-17 07:59:33 UTC
KMail expects the email address to be encoded according to RFC 2047 (MIME, Message Header Extensions for Non-ASCII Text). But we will consider your proposal to make it work for email addresses in local encoding. Have you verified that the fix you propose really fixes the problem? It is actually right that email address should be encoded according to RFC2047. But It's about command line arguments. No one want to type email address like this on command line: $ kmail --composer =?euc-kr?B?xde9usau?= \<test@test.com\> instead: $ kmail --composer "human readable string" \<test@test.com\> If the command line args are composed of US-ASCII (correctly encoded email addresses), QString::fromLocal8Bit() do nothing. So this works in either cases. Encoded string is needed only when email is actually sent. If KMail encode the mail address of "To" text entry, we will get correctly encoded email. I think program should do encoding job not human. Subject: KDE_3_1_BRANCH: kdenetwork/kmail CVS commit by kloecker: Fix bug 56049: wrong encoding of command line arguments Fix by Choe Hwanjin <hjchoe@hancom.com>. Furthermore handle mailto: URLs a little bit more correctly by removing the 'mailto:'. Of course, the real fix will be to completely parse the mailto: URL. CCMAIL: 56049-fixed@bugs.kde.org M +2 -2 main.cpp 1.166.2.3 --- kdenetwork/kmail/main.cpp #1.166.2.2:1.166.2.3 @@ -179,7 +179,7 @@ int KMailApplication::newInstance() to += ", "; if (strncasecmp(args->arg(i),"mailto:",7)==0) - to += args->arg(i); + to += args->url(i).path(); else - to += args->arg(i); + to += QString::fromLocal8Bit( args->arg(i) ); mailto = true; } |