]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/UTF8.pm
assume unknown encodings are UTF-8
[debbugs.git] / Debbugs / UTF8.pm
index 230ab79136fcc92f4c4bda9cf8c393a7aeb95fa6..999fc8a48fd6197b22261535e1e2d7292655a4a9 100644 (file)
@@ -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);