From f09599548fdb884df7e2ef38a48846caf0e3c1b9 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Sat, 9 Mar 2019 15:03:00 +0800 Subject: [PATCH] Expand a couple of the comments about charset 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 --- email/body.h | 4 +++- rfc1524.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/email/body.h b/email/body.h index 5c5671570..99d87c0be 100644 --- a/email/body.h +++ b/email/body.h @@ -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 diff --git a/rfc1524.c b/rfc1524.c index 2e3c082af..568b90db0 100644 --- 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 -- 2.40.0