diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | libsylph/procmime.c | 14 |
3 files changed, 24 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2005-11-25 + * libsylph/procmime.c: procmime_decode_content(): uncanonicalize + unencoded text. + +2005-11-25 + * libsylph/pop.c libsylph/recv.c: don't convert CR+LF to LF. * libsylph/procmime.c: procmime_decode_content(): don't uncanonicalize diff --git a/ChangeLog.ja b/ChangeLog.ja index a14876e2..ad8e5f13 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,10 @@ 2005-11-25 + * libsylph/procmime.c: procmime_decode_content(): エンコードされて + いないテキストを正規化解除するようにした。 + +2005-11-25 + * libsylph/pop.c libsylph/recv.c: CR+LF を LF に変換しないようにした。 * libsylph/procmime.c: procmime_decode_content(): message/rfc822 を 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); } } |