--- a/bin/maybe-notify-uploader Mon Feb 20 15:17:25 2012 +0100
+++ b/bin/maybe-notify-uploader Mon Feb 20 15:21:06 2012 +0100
@@ -2,6 +2,7 @@
use Mail::Sendmail;
use MIME::EncWords qw(encode_mimewords);
+use POSIX qw(locale_h);
my ($result, $codename, $source, $version, $changes) = @ARGV[0..4];
@@ -15,7 +16,7 @@
}
$r =~ $pat or $r = $fallback;
-$r = encode_mimewords($r, (Charset => $1)) if (defined $ENV{LANG} and $ENV{LANG} =~ /.*\.([^.]+)$/);
+$r = encode_mimewords($r, (Charset => $1)) if setlocale(NULL) =~ /.*\.([^.]+)$/;
my $mail = {