https://bugs.kde.org/show_bug.cgi?id=248058
--- Comment #8 from Thorsten Glaser <t.gla...@tarent.de> --- (In reply to Andre Heinecke from comment #7) > > PGP Inline is perfectly fine standardised: the display agent has to use the > > charset indicated by the PGP > > message, and discard any charset/encoding information of the surrounding > > message. > > No it's not. Especially the Encoding handling is very problematic and not > standardised. See: https://debian-administration.org/users/dkg/weblog/108 ( It is, and especially the encoding is trivial. It’s just often misunderstood or implemented wrong. Citing someone who doesn’t fully understand it doesn’t help (I knew that posting). Inline PGP is easy: the MIME-level encoding is valid for the “outer” part of the message; for example, if MIME says quoted-printable then those ‘=’ in the ASCII armour of the PGP message are encoded as “=3D”. The “inner” part of the message, i.e. the output of pgp/gpg decrypting it, is *completely* independent of the MIME message surrounding it, and for displaying it, *only* the rules that the command-line utilities use are valid; this means, that the OpenPGP-level encoding is used (which is always 8bit not quoted-printable or base64, and in absence of an explicit charset selection is UTF-8). The reason for this is easy: Inline PGP works, basically (i.e. without explicit MUA support), by someone writing a plaintext file, throwing that through pgp or gpg, and copy/pasting that into their MUA’s composer. Anything an MUA does to integrate Inline PGP support *must* behave *exactly the same*. > Basically your Mail says that it's ASCII Encoded but then actually has UTF-8 > encoding in the content after decryption. I would argue that this is not a See above, “after decryption” when Inline PGP is used means you *have* to *forget* anything from the previous container. Yes, this is different than what PGP/MIME requires. Yes, both are right, for their respective scopes. > KMail bug but that your Mail is broken. For proper encoding Handling you > need to use PGP/MIME. One of the Advantages of PGP/MIME is proper encoding This sounds half like a sales pitch, half like “KMail doesn’t handle encoding in Inline PGP correctly” – which is *exactly my point*. > GnuPG / GPGME itself does not do any reencoding it just decrypts the "bytes" > of the message. It does *record* the charset of the message. > As a "workaround" / to improve compatibility with broken MUA's I like > Sandro's idea to treat PGP Messages as UTF-8 if the specified Charset is > 7Bit ASCII. I think that would be a good solution to fix your bug. That would help in the specific case, but still leave KMail a broken MUA claiming to support Inline PGP and not doing it correctly. However, as a first step, it’s okay; please do so. Actually, why haven’t you done so yet… > Although I would suggest to use a proper MUA with PGP/MIME support. No, PGP/MIME often breaks, interestingly enough, with encoding-related issues, and with mailing lists. Its interoperability is also limited to MUAs supporting it, whereas interoperability of Inline PGP is maximal. -- You are receiving this mail because: You are watching all bug changes.