Charset conversion during encryption

Albert gnupg at ml0402.albert.uni.cc
Sun May 30 12:31:21 CEST 2004


Am Sonntag, 30. Mai 2004 00:18 schrieb David Shaw:

> Also true.  UTF-8 test in OpenPGP is historically a little weird.

This charset problem drives me crazy sometimes. Now I use SuSE 9.1 
with default-charset utf-8, but it happened with SuSE 8.2 and 
iso-8859-15 too.

Assume you made a shell-script (bash) to create a virus report with 
antivir

If you run the script manually everything works fine, if the script 
is started by a cron job KMail says, that there is an invalid 
signature.

I used the following:

ANTIVIROPTIONS="-s -v -z --allfiles -e -ren -dmdel -dmdas -r1 \
-rf$LOG_FILE_ANTIVIR -ra -lang=DE"

If I change to lang=EN everything is fine.

cat $LOG_FILE_SUMMARY \
| /usr/local/bin/gpg --local-user $SENDER --no-secmem-warning \ 
--quiet --charset utf-8 --textmode --clearsign --trusted-key \ 
"$LONGKEYID" \
| mail -s "Virusalarm on $MACHINE in $SCANDIR " \
| `date +%y-%m-%d`"  "`date +%H:%M` $WARN


So every time, when an umlaut is in the output the signature is 
invalid if the script is started by a cronjob, but the same script 
works fine, if it is started manually.

Albert



More information about the Gnupg-users mailing list