about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchMsg.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/SearchMsg.pm')
-rw-r--r--lib/PublicInbox/SearchMsg.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm
index caebe372..28c2037b 100644
--- a/lib/PublicInbox/SearchMsg.pm
+++ b/lib/PublicInbox/SearchMsg.pm
@@ -11,8 +11,6 @@ use POSIX qw//;
 use Date::Parse qw/str2time/;
 use PublicInbox::MID qw/mid_clean/;
 use PublicInbox::Address;
-use Encode qw/find_encoding/;
-my $enc_utf8 = find_encoding('UTF-8');
 our $PFX2TERM_RE = undef;
 use constant EPOCH_822 => 'Thu, 01 Jan 1970 00:00:00 +0000';
 use POSIX qw(strftime);
@@ -39,7 +37,7 @@ sub load_doc {
         my ($class, $doc) = @_;
         my $data = $doc->get_data;
         my $ts = get_val($doc, &PublicInbox::Search::TS);
-        $data = $enc_utf8->decode($data);
+        utf8::decode($data);
         my ($subj, $from, $refs, $to, $cc) = split(/\n/, $data);
         bless {
                 doc => $doc,