From: Don Armstrong Date: Tue, 2 Jan 2018 03:53:35 +0000 (-0800) Subject: assume unknown encodings are UTF-8 X-Git-Tag: release/2.6.0~33 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=1b1562614656acf70e9b69c8eb736673f370c816;ds=sidebyside assume unknown encodings are UTF-8 --- 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);