]> git.donarmstrong.com Git - debbugs.git/commitdiff
encode_rf1522 needs to handle utf8 strings
authorDon Armstrong <don@donarmstrong.com>
Mon, 26 Mar 2012 00:51:34 +0000 (17:51 -0700)
committerDon Armstrong <don@donarmstrong.com>
Mon, 26 Mar 2012 00:51:34 +0000 (17:51 -0700)
Debbugs/MIME.pm

index c2faeaa8621b3f5c580beb5c450425c1d39f9b6c..640627651581826bf8bcce5570d8acb46085a3ce 100644 (file)
@@ -286,6 +286,9 @@ sub encode_rfc1522 {
 
      # handle being passed undef properly
      return undef if not defined $rawstr;
+     if (is_utf8($rawstr)) {
+        $rawstr= encode_utf8($rawstr);
+     }
      # We process words in reverse so we can preserve spacing between
      # encoded words. This regex splits on word|nonword boundaries and
      # nonword|nonword boundaries. We also consider parenthesis and "