From 1b1562614656acf70e9b69c8eb736673f370c816 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 1 Jan 2018 19:53:35 -0800 Subject: [PATCH] assume unknown encodings are UTF-8 --- Debbugs/UTF8.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Debbugs/UTF8.pm b/Debbugs/UTF8.pm index 230ab79..999fc8a 100644 --- a/Debbugs/UTF8.pm +++ b/Debbugs/UTF8.pm @@ -200,6 +200,10 @@ sub __fallback_convert_to_utf8 { } # lets assume everything that doesn't have a charset is utf8 $charset //= 'utf8'; + ## if the charset is unknown, assume it's UTF-8 + if ($charset =~ /unknown/i) { + $charset = 'utf8'; + } my $result; eval { $result = decode($charset,$data,0); -- 2.39.2