[sylpheed:31311] Re: PGP/MIME-signing breaks sig delimiter
Hiroyuki Yamamoto
hiro-y at kcn.ne.jp
Tue May 15 13:30:28 JST 2007
Hello,
On Mon, 14 May 2007 13:09:46 +0200
Godwin Stewart <gstewart at bonivet.net> wrote:
> This patch against 2.4.1 should revert to the previous behaviour but
> with the exception outlined by ひろゆきさん in message #31301:
I have ended up with the following modification (for now):
(by the way, this message's encoding is ISO-2022-JP)
(Note: procmime_get_encoding_for_str() checks for the percentage of
8-bit characters in string and returns appropriate
Content-Transfer-Encoding)
--- src/compose.c (revision 1692)
+++ src/compose.c (working copy)
@@ -3075,19 +3075,22 @@
buf = canon_buf;
#if USE_GPGME
- /* chomp all trailing spaces */
+ /* protect trailing spaces */
if (rfc2015_is_available() && !is_draft &&
compose->use_signing && !compose->account->clearsign) {
- gchar *tmp;
- tmp = strchomp_all(buf);
- g_free(buf);
- buf = tmp;
-#if 0
- if (encoding == ENC_7BIT)
- encoding = ENC_QUOTED_PRINTABLE;
- else if (encoding == ENC_8BIT)
- encoding = ENC_BASE64;
-#endif
+ if (encoding == ENC_7BIT) {
+ if (!g_ascii_strcasecmp(body_charset, CS_ISO_2022_JP)) {
+ gchar *tmp;
+ tmp = strchomp_all(buf);
+ g_free(buf);
+ buf = tmp;
+ } else
+ encoding = ENC_QUOTED_PRINTABLE;
+ } else if (encoding == ENC_8BIT) {
+ encoding = procmime_get_encoding_for_str(buf);
+ if (encoding == ENC_7BIT)
+ encoding = ENC_QUOTED_PRINTABLE;
+ }
}
if (rfc2015_is_available() && !is_draft &&
--
Hiroyuki Yamamoto <hiro-y at kcn.ne.jp>
More information about the Sylpheed
mailing list