You are not logged in.

#1 2018-05-21 07:10:00

chowbok
Member
Registered: 2017-11-27
Posts: 20

Set character encoding for PGP-encrypted e-mail

I have this script that sends me a PGP e-mail on a particular event:

#!/usr/bin/bash
echo "$1 has completed." |
gpg --encrypt --armor --recipient me@example.com |
mail -s Completed  me@example.com

This works fine, but sometimes $1 contains Unicode characters. My mail client (Thunderbird + Enigmail) always displays it as us-ascii after decrypting. How can I attach the encrypted message so that it tells Thunderbird that it's UTF-8? I tried adding "-M "application/pgp-encrypted; charset=UTF-8" to the mail command line, but that just errored out.

Offline

#2 2018-05-23 08:30:05

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Set character encoding for PGP-encrypted e-mail

Does decrypting the email with gpg itself display the same issue?

Offline

#3 2018-05-23 16:39:47

chowbok
Member
Registered: 2017-11-27
Posts: 20

Re: Set character encoding for PGP-encrypted e-mail

No, that works fine, assuming I have my LANG variable set correctly.

Offline

Board footer

Powered by FluxBB