aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@fripost.org>2012-09-27 03:32:46 +0200
committerGuilhem Moulin <guilhem.moulin@fripost.org>2012-09-27 03:32:46 +0200
commitaa3340e58fc5b993bfc88070edf543a2ed82ef94 (patch)
treec2befe421e70971fd89be72073833b208b919ef2 /misc
parent7672946edb73d485e5eb0ffd75964f2cea2caaa0 (diff)
Fixing unicode.
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/mklist/mklist.pl9
1 files changed, 6 insertions, 3 deletions
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.
}