From d36950b74ceaa841622df1a885f6d5e20395ff8e Mon Sep 17 00:00:00 2001 From: hiro Date: Fri, 25 Nov 2005 10:41:29 +0000 Subject: uncanonicalize unencoded text when saving. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@780 ee746299-78ed-0310-b773-934348b2243d --- ChangeLog | 5 +++++ ChangeLog.ja | 5 +++++ libsylph/procmime.c | 14 ++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4ba85787..321989c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-25 + + * libsylph/procmime.c: procmime_decode_content(): uncanonicalize + unencoded text. + 2005-11-25 * libsylph/pop.c diff --git a/ChangeLog.ja b/ChangeLog.ja index a14876e2..ad8e5f13 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,8 @@ +2005-11-25 + + * libsylph/procmime.c: procmime_decode_content(): エンコードされて + いないテキストを正規化解除するようにした。 + 2005-11-25 * libsylph/pop.c diff --git a/libsylph/procmime.c b/libsylph/procmime.c index daca09ae..6207807e 100644 --- a/libsylph/procmime.c +++ b/libsylph/procmime.c @@ -637,9 +637,23 @@ FILE *procmime_decode_content(FILE *outfp, FILE *infp, MimeInfo *mimeinfo) flag = TRUE; } } else { +#ifndef G_OS_WIN32 + gboolean uncanonicalize = FALSE; + ContentType content_type; + + content_type = procmime_scan_mime_type(mimeinfo->content_type); + if (content_type == MIME_TEXT || + content_type == MIME_TEXT_HTML) + uncanonicalize = TRUE; +#endif + while (fgets(buf, sizeof(buf), infp) != NULL && (!boundary || !IS_BOUNDARY(buf, boundary, boundary_len))) { +#ifndef G_OS_WIN32 + if (uncanonicalize) + strcrchomp(buf); +#endif fputs(buf, outfp); } } -- cgit v1.2.3