X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FI18N.pm;h=de93512a391d63dda58b0e6497a1d77da4f98bc7;hb=31f3763747b82764bb019cfab5b2a2945fc9a99d;hp=11cd5f1201c060496e909c0f7d800e7c49ba4024;hpb=5e9677cbad2051ea452b389fa03bddf37166c590;p=freeside.git diff --git a/rt/lib/RT/I18N.pm b/rt/lib/RT/I18N.pm index 11cd5f120..de93512a3 100644 --- a/rt/lib/RT/I18N.pm +++ b/rt/lib/RT/I18N.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -245,7 +245,10 @@ sub SetMIMEEntityToEncoding { . $head->mime_type . " - " . ( Encode::decode("UTF-8",$head->get('subject')) || 'Subjectless message' ) ); - Encode::from_to( $string, $charset => $enc ); + { + no warnings 'utf8'; + $string = Encode::encode( $enc, Encode::decode( $charset, $string) ); + } my $new_body = MIME::Body::InCore->new($string); @@ -549,7 +552,8 @@ sub SetMIMEHeadToEncoding { $head->delete($tag); foreach my $value (@values) { if ( $charset ne $enc || $enc =~ /^utf-?8(?:-strict)?$/i ) { - Encode::from_to( $value, $charset => $enc ); + no warnings 'utf8'; + $value = Encode::encode( $enc, Encode::decode( $charset, $value) ); } $value = DecodeMIMEWordsToEncoding( $value, $enc, $tag ) unless $preserve_words;