[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.7-374-ge65953a

? sunnavy sunnavy at bestpractical.com
Thu May 6 09:46:28 EDT 2010


The branch, 3.8-trunk has been updated
       via  e65953a67ea491360fdb275040da971406412244 (commit)
      from  49fa6755dbbf2097646a906e244d1f503be17ddc (commit)

Summary of changes:
 lib/RT/I18N.pm |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit e65953a67ea491360fdb275040da971406412244
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu May 6 21:45:44 2010 +0800

    reset to orig str before the subsequent from_to

diff --git a/lib/RT/I18N.pm b/lib/RT/I18N.pm
index 7ddc072..902701a 100755
--- a/lib/RT/I18N.pm
+++ b/lib/RT/I18N.pm
@@ -359,8 +359,10 @@ sub DecodeMIMEWordsToEncoding {
 
 	# now we have got a decoded subject, try to convert into the encoding
     unless ( $charset eq $enc ) {
+        my $orig_str = $enc_str;
         eval { Encode::from_to( $enc_str, $charset, $enc, Encode::FB_CROAK ) };
         if ($@) {
+            $enc_str = $orig_str;
             $charset = _GuessCharset($enc_str);
             Encode::from_to( $enc_str, $charset, $enc );
         }

-----------------------------------------------------------------------


More information about the Rt-commit mailing list