From aa3340e58fc5b993bfc88070edf543a2ed82ef94 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 27 Sep 2012 03:32:46 +0200 Subject: Fixing unicode. --- misc/mklist/mklist.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'misc') diff --git a/misc/mklist/mklist.pl b/misc/mklist/mklist.pl index ac5f526..3223c45 100755 --- a/misc/mklist/mklist.pl +++ b/misc/mklist/mklist.pl @@ -29,6 +29,8 @@ use Config::Auto; use lib 'lib'; use Mail::GnuPG; use MIME::Parser; +use MIME::QuotedPrint; +use Net::IDN::Encode qw/email_to_ascii/; use Fripost::Schema; my $transport = shift; @@ -92,9 +94,10 @@ my ($list, $owner, $password); # address. my @body = grep { !/^\s*$/ } (split /\s*\n\s*/, $msg->parts(0)->stringify_body); - $list = shift @body; - $owner = shift @body; - $password = shift @body; + $list = decode_qp(shift @body); + Encode::_utf8_on($list); $list = email_to_ascii($list); + $owner = decode_qp(shift @body); + $password = decode_qp(shift @body); # TODO: idealy the email would be encrypted (at least for schleuder), # since it contains a password. } -- cgit v1.2.3