]> granicus.if.org Git - neomutt/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)
committerRichard Russon <rich@flatcap.org>
Tue, 9 Apr 2019 11:54:27 +0000 (12:54 +0100)
Make it clearer what BODY->charset is used for, and why we are
checking for !noconv during mailcap charset parameter expansion.

Co-authored-by: Richard Russon <rich@flatcap.org>
email/body.h
rfc1524.c

index 5c56715706cc1cd54aa67cc5fbddf7a12307e633..99d87c0be5d567f892562565520a2e61124b349c 100644 (file)
@@ -50,7 +50,9 @@ struct Body
   char *d_filename;               /**< filename to be used for the
                                     content-disposition header.
                                    * 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. */
   struct Content *content;        /**< structure used to store detailed info about
                                    * the content of the attachment.  this is used
                                    * to determine what content-transfer-encoding
index 2e3c082af4a32cc8b4fa41ea4d7b59ef6e744100..568b90db0ab815e6165d4eed86fe6968b9b2c1e4 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -105,7 +105,8 @@ int rfc1524_expand_command(struct Body *a, const char *filename,
         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 ((mutt_str_strcasecmp(param, "charset") == 0) && a->charset && !a->noconv)
           pvalue2 = a->charset;
         else