[rt-devel] Encoding error after dump import

Michael van Elst mlelstv at dev.de.cw.net
Tue Aug 19 09:41:05 EDT 2003


On Tue, Aug 19, 2003, mixo wrote:

> I have just imported data from RT 2.0.13 into two instances of RT 3.0.4.
> The one instance has Mysql and the other Pg. When I trying to view ticket
> with id 8000, I got "System error " as detailed in the attachement
> "rt3-enc-error.html".

That's a bug. The following patch helps:

--- lib/RT/Attachment_Overlay.pm.dist   2003-08-06 13:01:15.000000000 +0200
+++ lib/RT/Attachment_Overlay.pm    2003-08-06 13:01:32.000000000 +0200
@@ -313,7 +313,9 @@
     # If we somehow fail to do the decode, at least push out the raw bits
     eval {return( Encode::decode_utf8($content))} || return ($content);
   }
-  Encode::from_to($content, 'utf8' => $enc);
+  if (!$enc) {
+    eval {Encode::from_to($content, 'utf8' => $enc);}
+  }
   return $content;
 }


-- 
    ,eM""=.            a"-.                         Michael van Elst
   dWWMWM" -          :GM==;                        mlelstv at dev.de.cw.net
  :WWMWMw=--.          "W='  cable & wireless
   9WWMm==-.
    "-Wmw-"  CABLE & WIRELESS



More information about the Rt-devel mailing list