]> granicus.if.org Git - mutt/commitdiff
Expand a couple of the comments about charset.
authorKevin McCarthy <kevin@8t8.us>
Sat, 9 Mar 2019 07:03:00 +0000 (15:03 +0800)
committerKevin McCarthy <kevin@8t8.us>
Sat, 9 Mar 2019 07:07:29 +0000 (15:07 +0800)
Make it clearer what BODY->charset is used for, and why we are
checking for !noconv during mailcap charset parameter expansion.

mutt.h
rfc1524.c

diff --git a/mutt.h b/mutt.h
index e507ea5e86467c0e8431be037a2a19520da2a1ae..0ce50fab9f901634d586f0b518555378db180f77 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -732,7 +732,9 @@ typedef struct body
                                 * If NULL, filename is used
                                 * instead.
                                 */
-  char *charset;                /* charset of attached file */
+  char *charset;                /* send mode: charset of attached file as stored
+                                 * on disk.  the charset used in the generated
+                                 * message is stored in parameter. */
   CONTENT *content;             /* structure used to store detailed info about
                                 * the content of the attachment.  this is used
                                 * to determine what content-transfer-encoding
index e7755035f3bfa90d1d4da8f675cdd66e07722a47..165e2c06a133da758aab409d2d7c1e1cd8f46d26 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -103,7 +103,8 @@ int rfc1524_expand_command (BODY *a, const char *filename, const char *_type,
        param[z] = '\0';
 
         /* In send mode, use the current charset, since the message hasn't
-         * been converted yet. */
+         * been converted yet.   If noconv is set, then we assume the
+         * charset parameter has the correct value instead. */
         if ((ascii_strcasecmp (param, "charset") == 0) && a->charset && !a->noconv)
           _pvalue = a->charset;
         else