[kmail2] [Bug 321848] New: Base64 decode on MBCS strings may carry out incomplete snippets

Korepwx web at korepwx.com
Tue Jul 2 04:19:07 BST 2013


https://bugs.kde.org/show_bug.cgi?id=321848

            Bug ID: 321848
           Summary: Base64 decode on MBCS strings may carry out incomplete
                    snippets
    Classification: Unclassified
           Product: kmail2
           Version: 4.10.3
          Platform: Ubuntu Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kdepim-bugs at kde.org
          Reporter: web at korepwx.com

I'm a Chinese speaking user. I noticed that, if the original mail splits MBCS
strings into incomplete 
base64 encoded snippets, Kmail will also decode it incompletely. Say that, if
we have a mail with base64 encoded subjects like this:

Subject: =?utf-8?B?V2luZG93cyA4IOeOsOW3suWPkeW4g+OAgiDor7fnjrDlnKjl?=
 =?utf-8?B?sLHojrflj5bljYfnuqfjgII=?=

We can see that
"V2luZG93cyA4IOeOsOW3suWPkeW4g+OAgiDor7fnjrDlnKjlsLHojrflj5bljYfnuqfjgII=" as a
whole it carry out the sentence "Windows 8 现已发布。 请现在就获取升级。", while
"V2luZG93cyA4IOeOsOW3suWPkeW4g+OAgiDor7fnjrDlnKjl" carrys out "Windows 8 现已发布。
请现在?" (there is an incomplete UTF-8 character at the end), and
"sLHojrflj5bljYfnuqfjgII=" carrys out "??获取升级。" (again an incomplete UTF-8
character at the begining).

Not only mails from Microsoft (lol) behave like this. I receive mails from
Facebook apps, and they have this problem as well. In fact, I think it should
be all right if you put two piece of MBCS string together before you convert
them into QString (yes, from MBCS to UTF-16), rather than join each as a whole.

Reproducible: Always

Steps to Reproduce:
1. You're using UTF-8, GBK, SHIFT_JIS or any MBCS character encoding.
2. The original mail may not agree with some formal restrictions, but they're
still ok.
Actual Results:  
The MBCS strings are decoded incompletely.

Expected Results:  
MBCS strings should be put together and decoded completely.

http://goo.gl/KieAq, This is my screenshot.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list