Bug 168327

Summary: Knode trashes articles when using UTF-16 encoding
Product: [Unmaintained] knode Reporter: Michael Schmarck <michael.schmarck>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Michael Schmarck 2008-08-04 13:55:19 UTC
Version:           0.99.01 (using 4.1.00 (KDE 4.1.0), Arch Linux)
Compiler:          gcc
OS:                Linux (i686) release 2.6.25-ARCH

In the newsgroup saar.test, I posted the following:

#########################################################
Path: uni-berlin.de!individual.net!not-for-mail
From: Michael Schmarck <usenet-michael@schmarck.cn>
Newsgroups: saar.test
Subject: =?UTF-8?B?YmzDtmRl?= in utf7
Followup-To: saar.test
Date: Mon, 04 Aug 2008 13:39:06 +0200
Lines: 5
Message-ID: <6fo82pFcgc7oU4@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8Bit
X-Trace: individual.net HpFKKnDVVADjT5TFryYZYg6W2lURwJlxuuxgtUsJ4aRC5xipQ=
Cancel-Lock: sha1:AQn7JfCMljLvMytnMW6j1VXj27I=
User-Agent: KNode/0.99.01
Xref: uni-berlin.de saar.test:3376

Süper

Bleibt das jetzt utf7?

Michael
#########################################################



I then posted a reply to this, quoting the original article in full and 
added some additional text.

I changed the encoding to UTF-16.

When I read the article (sent back from news.individual.net), I see:

#########################################################
Path: uni-berlin.de!individual.net!not-for-mail
From: Michael Schmarck <usenet-michael@schmarck.cn>
Newsgroups: saar.test
Subject: =?UTF-16?B?//5SAGUAOgAgAGIAbAD2AGQAZQAgAGkAbgAgAHUAdABmADcA?=
Followup-To: saar.test
Date: Mon, 04 Aug 2008 13:40:54 +0200
Lines: 9
Message-ID: <6fo898Fck09oU1@mid.individual.net>
References: <6fo82pFcgc7oU4@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-16"
Content-Transfer-Encoding: 8Bit
X-Trace: individual.net 2gkviEG2QhaiMXMNtcRprwg7MDb87U7RvrZEEaREKthab4Cf4=
Cancel-Lock: sha1:TIsNavcZfg2YUqW1GfU/WTkZOkY=
User-Agent: KNode/0.99.01
Xref: uni-berlin.de saar.test:3380

ÿþM








#########################################################

As you can see, the content has been replaced by:

#########################################################
ÿþM








#########################################################

That's not what I wrote.
Comment 1 Michael Schmarck 2008-08-04 13:56:57 UTC
Oh, another interesting side effect:
In the From, there's my full real name and an e-mailadress of mine. For this one article, Knode does not display my full realname in the "thread browser" (upper right hand side of the Knode window). Instead, it just displays "Michael".
Comment 2 Olivier Trichet 2009-05-13 20:58:23 UTC
Hello Michael,

I just did the same test as you (actually I reply to your test message) and I admit it was weird, but I think the result was ok.

I says it's ok because the body of the sent message was really the UTF-16 body that was send ; and knode read it.
Please note that the view source option decodes the message as a full us-ascii message, and because you sent the message with a 8bit transfer encoding, this is why you only garbage there.

Anyways, I'm still unsure if it's a bug and what would be the bug here. Sending UTF-16 is a really strange idea.

As for the header view where only "Mickeal" was shown, I suspect this is a problem on the server side.


PS : I did the test with a pre-KDE 4.3 release.
Comment 3 Olivier Trichet 2009-08-10 23:07:58 UTC
SVN commit 1009796 by otrichet:

List of available charsets encoding:
 - remove invalid charsets (without encoder/decoder) and UTF-16 (bug #168327)
 - display description along charset name in every list of charsets

BUG: 168327

 M  +7 -2      articlewidget.cpp  
 M  +11 -7     kncomposer.cpp  
 M  +6 -4      knconfigwidgets.cpp  
 M  +5 -4      kngrouppropdlg.cpp  
 M  +3 -2      tests/knodetest.cpp  
 M  +30 -4     utils/locale.cpp  
 M  +12 -0     utils/locale.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1009796