X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FLog.pm;h=551fd392a36fafea8b452377e30f19dbdc20d266;hb=c04432ba467f7f957835b7264157951787e27f4c;hp=8b99b7de7a097207ffbe6abff3848edeae63fe52;hpb=7d96d08af28cfc7a0619146d9b232d6b7ced0cf7;p=debbugs.git diff --git a/Debbugs/Log.pm b/Debbugs/Log.pm index 8b99b7d..551fd39 100644 --- a/Debbugs/Log.pm +++ b/Debbugs/Log.pm @@ -405,6 +405,15 @@ sub write_log_records if (defined $recips) { croak "recips not undef or array" unless ref($recips) eq 'ARRAY'; + my $wrong_encoding = 0; + my @recips = + map { if (is_utf8($_)) { + $wrong_encoding=1; + encode_utf8($_); + } else { + $_; + }} @$recips; + carp('Recipients was in the wrong encoding (perl internal instead of utf8 octets') if $wrong_encoding; print {$logfh} join("\04", @$recips) . "\n" or die "Unable to write to logfile: $!"; } else {