我有一个具有日文字符的文件,当我用shell脚本发送邮件时附带的邮件有???而不是日文字符。有什么方法可以解决这个问题吗?
cat JPData.csv
"7","銈炽兗銉撱兗 11 銉°兂銈?銉愩偣銈便儍銉堛儨銉笺儷銈枫儱銉笺偤"
邮件脚本:
mail_msg() { export SUBJECT="Details file"" export
ATTACH="JPData.csv" ( echo "From: $MAILFROM"
echo "To: $MAILTO"
echo "CC: $MAILCC"
echo "Subject: $SUBJECT"
echo "MIME-Version: 1.0"
echo 'Content-Type: multipart/mixed; boundary="-q1w2e3r4t5"'
echo
echo '---q1w2e3r4t5'
echo 'Content-Type: text/plain; charset=utf-8'
echo 'Content-Transfer-Encoding: 8bit'
echo
echo "Please find the attachement"
echo '---q1w2e3r4t5'
echo 'Content-Type: text/html; charset=utf-8; name=JPData.csv'
echo 'Content-Transfer-Encoding: base64'
echo 'Content-Disposition: attachment; filename=JPData.csv'
echo
base64 <"$ATTACH"
echo
echo '---q1w2e3r4t5--' ) | /usr/sbin/sendmail $MAILTO
}
答案 0 :(得分:0)
你试过吗
.nojekyll