You have already been given your answers; I am sorry you are struggling to hear them. choroba showed that the strings can be decoded fine, and I explained that you are using a bad value for the encoding.
#!/usr/bin/perl
use strict;
use warnings;
use feature 'say';
use utf8;
use Encode;
my $str = '1669-SCC-HôpitauxdeSaint-Maurice-POC.PIF';
say 'UTF-8: ' . encode('UTF-8', $str);
say 'MIME-Header: ' . encode('MIME-Header', $str);
$str = 'test1℗ὓ.txt';
say 'UTF-8: ' . encode('UTF-8', $str);
say 'MIME-Header: ' . encode('MIME-Header', $str);
__END__
$ perl foo.pl UTF-8: 1669-SCC-HôpitauxdeSaint-Maurice-POC.PIF MIME-Header: =?UTF-8?B?MTY2OS1TQ0MtSMO0cGl0YXV4ZGVTYWludC1NYXVyaWNlLVBPQy5QSUY=?= UTF-8: test1℗ὓ.txt MIME-Header: =?UTF-8?B?dGVzdDHihJfhvZMudHh0?=
In reply to Re^8: How to know to know if string is utf8 encoded or decoded.
by 1nickt
in thread How to know to know if string is utf8 encoded or decoded.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |