From 94d116ca5e9735ba47a755e7cbfb2b429ec5e88e Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Wed, 19 Apr 2017 15:54:51 +0300 Subject: Automatically handle native character sets on input to the mail utility. If the mime header is set, then mail will provide the missing 'charset' parameter for each Content-Type header that begins with 'text/'. Its value will be determined by examining the 'charset' mail variable. If it is set to 'auto' (the default), the character set will be extracted from the value of the LC_ALL environment variable. If it is unset, it will be deduced from the LANG environment variable. Thus, provided that LC_ALL is set correctly, the following setting in .mailrc is recommended to ensure that mails in native character sets will be processed correctly: set charset=auto mime In most cases, it can be simplified to just 'set mime'. * NEWS: Update. * doc/texinfo/programs.texi: Update the description of the charset variable. * mail/mail.h (util_get_charset): New proto. * mail/send.c (attach_set_content_type): New function. (attlist_add, add_body): Use attach_set_content_type to set the content_type field. * mail/util.c (util_get_charset): New function. (util_rfc2047_decode): Use util_get_charset. --- NEWS | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 2c738989c..ca1f74315 100644 --- a/NEWS +++ b/NEWS @@ -104,6 +104,16 @@ in MIME format. In fact, the '--mime' option is equivalent to '-E set mime', except that it takes effect after all options are processed. +** Character sets + +The 'charset' variable controls both input and output operations. On +input it is used to set the value of the missing 'charset' parameter +in the 'Content-Type' MIME header, if its value begins with 'text/'. +This means, in particular, that if this variable is set to its default +value (charset=auto), the LC_ALL environment variable is correctly +set, and the 'mime' variable is set, then mail can safely be used to +send messages in native character sets. + ** New option --alternative When used with --attach or --attach-fd options, this option sets the -- cgit v1.2.1