24 lines
360 B
Perl
24 lines
360 B
Perl
#! /usr/bin/perl -w
|
|
#
|
|
# mew.pl
|
|
#
|
|
# converts from and to MIME encoded words
|
|
#
|
|
#
|
|
# Copyright (c) 2023 Thomas Hochstein <thh@thh.name>
|
|
|
|
use utf8;
|
|
use Encode;
|
|
use MIME::QuotedPrint;
|
|
use MIME::Base64;
|
|
|
|
my $input = join (' ',@ARGV);
|
|
|
|
if ($input =~ /[\x80-\x{ffff}]/o) {
|
|
print encode('MIME-Q', $input);
|
|
} else {
|
|
print decode('MIME-Q', $input);
|
|
};
|
|
|
|
print "\n";
|