[rt-users] "Unrecognised line" error from EmailParser

Alex Vandiver alexmv at bestpractical.com
Wed Aug 11 18:07:49 EDT 2004


On Wed, 2004-08-11 at 17:51, Tony Bowden wrote: 
> Unrecognised line: tony at tmtm.com at
> /home/customers/sites/rt//lib/RT/EmailParser.pm line 404
> [snip] 
> Anyone seen anything like this before?
It's caused by a utf8 / regex interaction bug in perl 5.8.0.  A
workaround has been checked into the subversion repository of RT; either
upgrade perl, use rt from subversion, or apply the following patch.
- Alex

Modified: lib/RT/EmailParser.pm
==============================================================================
--- lib/RT/EmailParser.pm       (original)
+++ lib/RT/EmailParser.pm       Fri Jul 30 15:59:24 2004
@@ -467,6 +467,8 @@
     my $self = shift;
     my $Addr = shift;
 
+    # Perl 5.8.0 breaks when doing regex matches on utf8
+    Encode::_utf8_off($Addr) if $] == 5.008;
     my @Addresses = Mail::Address->parse($Addr);
 
     my $AddrObj = $Addresses[0];
-- 
Networking -- one letter away from not working



More information about the rt-users mailing list