浏览代码

Maybe not mojibake things in Local provider

Andy Baugh 7 年之前
父节点
当前提交
76860b0d78
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      lib/Cpanel/iContact/Provider/Local.pm

+ 8 - 3
lib/Cpanel/iContact/Provider/Local.pm

@@ -63,9 +63,14 @@ sub send {
 
     my @errs;
 
-    my $subject = $args_hr->{'subject'};
-    my $text    = ${ $args_hr->{'text_body'} };
-    my $html    = ${ $args_hr->{'html_body'} };
+    my $subject_copy = $args_hr->{'subject'};
+    my $text_copy    = ${ $args_hr->{'text_body'} };
+	my $html_copy    = ${ $args_hr->{'html_body'} };
+
+    require Encode;
+    my $subject      = Encode::decode_utf8( $subject_copy, $Encode::FB_QUIET );
+    my $text         = Encode::decode_utf8( $text_copy, $Encode::FB_QUIET );
+    my $html         = Encode::decode_utf8( $html_copy, $Encode::FB_QUIET );
 
     # Send it
     my $time = time;