Environment variable in Perl to ensure mailx uses the right encoding
Posted: Thu Jul 27, 2023 3:45 pm
When using UTF-8 on server with Chinese for email, mailx will sometimes get confused and send out ??? instead of Chinese characters. In such case, add the following environment variable would fix the issue.
Code: Select all
$ENV{'LANG'} = 'en_US.UTF-8';