From 2a780f9eed69b4856e3a89d8682d0eed37c4e7b5 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 30 May 2026 12:07:58 +0200 Subject: [PATCH 1/3] Fix encoding. Signed-off-by: Thomas Hochstein --- mew.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mew.pl b/mew.pl index 9cee2f6..a9a8ee4 100644 --- a/mew.pl +++ b/mew.pl @@ -8,11 +8,13 @@ # Copyright (c) 2023 Thomas Hochstein use utf8; +use open qw(:std :encoding(UTF-8)); use Encode; use MIME::QuotedPrint; use MIME::Base64; my $input = join (' ',@ARGV); +utf8::decode($input); if ($input =~ /[\x80-\x{ffff}]/o) { print encode('MIME-Q', $input); From a85252732b6dd7d87eb9819b5149c94f15952dc5 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 30 May 2026 12:07:58 +0200 Subject: [PATCH 2/3] mew: Fix encoding. Signed-off-by: Thomas Hochstein --- mew.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mew.pl b/mew.pl index 9cee2f6..a9a8ee4 100644 --- a/mew.pl +++ b/mew.pl @@ -8,11 +8,13 @@ # Copyright (c) 2023 Thomas Hochstein use utf8; +use open qw(:std :encoding(UTF-8)); use Encode; use MIME::QuotedPrint; use MIME::Base64; my $input = join (' ',@ARGV); +utf8::decode($input); if ($input =~ /[\x80-\x{ffff}]/o) { print encode('MIME-Q', $input); From 7a08e41148d2b2488c6c260f484b523db500d1c0 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 30 May 2026 12:48:59 +0200 Subject: [PATCH 3/3] mew: Use minimal encoding. Signed-off-by: Thomas Hochstein --- mew.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mew.pl b/mew.pl index a9a8ee4..1b9faaa 100644 --- a/mew.pl +++ b/mew.pl @@ -17,9 +17,10 @@ my $input = join (' ',@ARGV); utf8::decode($input); if ($input =~ /[\x80-\x{ffff}]/o) { - print encode('MIME-Q', $input); + $output = encode('MIME-Q', $input); + $output =~ s/=20/_/g; } else { - print decode('MIME-Q', $input); + $output = decode('MIME-Q', $input); }; -print "\n"; +print "$output\n";