Environment variable in Perl to ensure mailx uses the right encoding

Moderator: cah

Post Reply
cah
General of the Army / Fleet Admiral / General of the Air Force
General of the Army / Fleet Admiral / General of the Air Force
Posts: 1336
Joined: Sun Aug 17, 2008 5:05 am

Environment variable in Perl to ensure mailx uses the right encoding

Post by cah »

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';
CAH, The Great
Post Reply