diff options
author | Eric Wong <e@80x24.org> | 2014-04-15 06:00:16 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-04-15 06:00:16 +0000 |
commit | a9c1a93cfa88e19477e025ce4f451086e5d0213e (patch) | |
tree | 03183348d83f355ddfb28021e5c390d0082075d9 /public-inbox-mda | |
parent | 68230baf6e82ed54533734a7114b0d4509d2a149 (diff) | |
download | public-inbox-a9c1a93cfa88e19477e025ce4f451086e5d0213e.tar.gz |
Users with non-US-ASCII compatible names were not showing up properly in "git log" output.
Diffstat (limited to 'public-inbox-mda')
-rwxr-xr-x | public-inbox-mda | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/public-inbox-mda b/public-inbox-mda index 6e66fa71..2335cd3e 100755 --- a/public-inbox-mda +++ b/public-inbox-mda @@ -7,6 +7,8 @@ my $usage = 'public-inbox-mda < rfc2822_message'; use Email::Filter; use Email::Address; +use Encode qw/decode encode/; +use Encode::MIME::Header; use File::Path::Expand qw/expand_filename/; use IPC::Run qw(run); use constant MDA => 'ssoma-mda'; @@ -45,7 +47,8 @@ if (PublicInbox->precheck($filter, $recipient) && set_list_headers($simple, $dst); $filter->simple($simple); - my $from = $filter->from; + my $from = decode('MIME-Header', $filter->from); + $from = encode("utf8", $from); my @from = Email::Address->parse($from); my $name = $from[0]->name; defined $name or $name = ""; |