X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fmessages.c;h=2dcd3ca42aa21f72fc0726c835dc8528a8bc0741;hb=8a5663b6c0957a4036bbd1ba8f316ea016746016;hp=66c8aa7a1530fedddb1aa14fe72c9df8732eebb0;hpb=a1b9fd75f6798f9dac2c9b4957bc08a62362496c;p=citadel.git diff --git a/webcit/messages.c b/webcit/messages.c index 66c8aa7a1..2dcd3ca42 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -671,11 +671,12 @@ void read_message(long msgnum, int printable_view, char *section) { "TARGET=\"wc.%ld.%s\">" "\n" - "Part %s: %s (%s, %d bytes)
\n", + "%s (%s, %d bytes)
\n", msgnum, mime_partnum, mime_filename, msgnum, mime_partnum, - mime_partnum, mime_filename, - mime_content_type, mime_length); + mime_filename, + mime_content_type, mime_length + ); } /*** begin handler prep ***/ @@ -847,11 +848,14 @@ void read_message(long msgnum, int printable_view, char *section) { /* Set up a character set conversion if we need to (and if we can) */ #ifdef HAVE_ICONV + if (strchr(mime_charset, ';')) strcpy(strchr(mime_charset, ';'), ""); if ( (strcasecmp(mime_charset, "us-ascii")) - && (strcasecmp(mime_charset, "UTF-8")) ) { + && (strcasecmp(mime_charset, "UTF-8")) + && (strcasecmp(mime_charset, "")) + ) { ic = iconv_open("UTF-8", mime_charset); if (ic == (iconv_t)(-1) ) { - lprintf(5, "iconv_open() failed: %s\n", strerror(errno)); + lprintf(5, "%s:%d iconv_open(UTF-8, %s) failed: %s\n", __FILE__, __LINE__, mime_charset, strerror(errno)); } } #endif @@ -914,7 +918,7 @@ void read_message(long msgnum, int printable_view, char *section) { } /* If there are attached submessages, display them now... */ - if (strlen(mime_submessages) > 0) { + if ( (strlen(mime_submessages) > 0) && (!section[0]) ) { for (i=0; i 0) { + if ( (strlen(mime_http) > 0) && (!section[0]) ) { wprintf("%s", mime_http); } @@ -1200,10 +1203,12 @@ void pullquote_message(long msgnum, int forward_attachments) { /* Set up a character set conversion if we need to (and if we can) */ #ifdef HAVE_ICONV if ( (strcasecmp(mime_charset, "us-ascii")) - && (strcasecmp(mime_charset, "UTF-8")) ) { + && (strcasecmp(mime_charset, "UTF-8")) + && (strcasecmp(mime_charset, "")) + ) { ic = iconv_open("UTF-8", mime_charset); if (ic == (iconv_t)(-1) ) { - lprintf(5, "iconv_open() failed: %s\n", strerror(errno)); + lprintf(5, "%s:%d iconv_open() failed: %s\n", __FILE__, __LINE__, strerror(errno)); } } #endif