Hi Kirill, Kirill Miazine wrote on Wed, Sep 20, 2023 at 12:52:52PM +0200:
> you may not even need -m, and instead inspect LC_CTYPE environment > variable and add appropriate headers for UTF-8. according to locale(1), > LC_CTYPE may be set to indicate UTF-8: > > If the value of LC_CTYPE ends in ‘.UTF-8’, programs in the OpenBSD base > system ignore the beginning of it, treating for example zh_CN.UTF-8 > exactly like en_US.UTF-8. This is definitely very bad advice. Whether the user uses an UTF-8 locale for their shell and terminal has nothing to do with whether they want to be send UTF-8 encoded mail with MIME headers. For example, i'm using LC_CTYPE=en_US.UTF-8 for my shells and terminals most of the time, but i do not want the low-level mail(1) MUA to suddenly start sending UTF-8 mail without being specifically asked to. I just checked - even though i'm using the higer-level mutt(1) MUA most of the time and even though the shell i'm starting mutt(1) from has LC_CTYPE=C.UTF-8 set on that particular machine, the last sixteen mails i sent all contained the explicit header Content-Type: text/plain; charset=us-ascii and intentionally so. Yes, i do occasionally send UTF-8 mail on purpose, mostly in highly technical messages that need to display particular Unicode characters in addition to mentioning their codepoints in the U+[XX]XXXX form, and rarely, sending UTF-8 happens inadvertently because mutt(1) contains some weird autodetection logic - but what you set your terminal to and what you use for sending mail are clearly completely unrelated topics. Yours, Ingo