[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: [Bug 51180] changes underscores in spaces in quoted-printable attachments
From:       Wolfgang Westphal <wolfgang.westphal () gmx ! de>
Date:       2002-11-27 8:29:06
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Wednesday 27 November 2002 00:49 schrieb Marc Mutz:
> What's the bug exctly? That KMail produces ' ' -> '_' in QP attachments?
> Or that it doesn't decode them?

Underscores in QP message parts are decoded as spaces, so KMail produces 
'_' -> ' '.

> The mQEncding flag is set by the ctor and then never written again. I
> don't see how that could affect anything.

The problem is that it is set true, although false is passed to the 
constructor.

> A nice workaround is maybe to leave the const, but move the bool
> mQEncoding to before the bool : 1's and removing it's :1. maybe that's
> what causes gcc to miscompile?

Leaving it const and moving it up at first place works for me, no need to 
remove it's :1. Patch attached.

Regards,
Wolfgang
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE95IJgGoxYmT/KkJkRAj3gAKCILm+F9ulpaPgjQPHx3pMiazjytQCdFYNa
978JDpAOr8G3zSIZgWAAeHE=
=mSY3
-----END PGP SIGNATURE-----

["kmime_codec_qp_v2.diff" (text/x-diff)]

Index: kmime_codec_qp.cpp
===================================================================
RCS file: /cvs/kdenetwork/libkdenetwork/kmime_codec_qp.cpp,v
retrieving revision 1.8
diff -u -3 -p -r1.8 kmime_codec_qp.cpp
--- kmime_codec_qp.cpp	2002/04/19 23:00:10	1.8
+++ kmime_codec_qp.cpp	2002/11/27 08:08:31
@@ -104,11 +104,11 @@ class QuotedPrintableDecoder : public De
       @li @p insideHexChar == @p true, @p mAccu != 0:
           saw the first nibble '=X'
    */
+  const bool mQEncoding : 1;
   bool mInsideHexChar   : 1;
   bool mFlushing        : 1;
   bool mExpectLF        : 1;
   bool mHaveAccu        : 1;
-  const bool mQEncoding : 1;
 protected:
   friend class QuotedPrintableCodec;
   friend class Rfc2047QEncodingCodec;
@@ -119,11 +119,11 @@ protected:
       mEscapeChar(aEscapeChar),
       mBadChar(0),
       mAccu(0),
+      mQEncoding(aQEncoding),
       mInsideHexChar(false),
       mFlushing(false),
       mExpectLF(false),
-      mHaveAccu(false),
-      mQEncoding(aQEncoding) {}
+      mHaveAccu(false) {}
 public:
   virtual ~QuotedPrintableDecoder() {}
 

_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic