[rt-devel] Re: RT 2.1.56

Autrijus Tang autrijus at autrijus.org
Fri Jan 3 22:05:18 EST 2003


On Fri, Jan 03, 2003 at 07:50:32PM -0500, Jesse Vincent wrote:
> Oh. and it's important to note that MailTools has a unicode bug on perl
> 5.8.0, which renders the mailgate temporarily inoperable.

Just for the record, the bug is not MailTools' bug perl's --
It's just MailTools exposed this bug.

For people who want to test before Overmeer applies my patch,
grab MailTools 1.53 and apply the following patch.  The bugs
should magically go away.

Thanks,
/Autrijus/

--- Mail/Field.pm.orig	Sat Jan  4 08:22:58 2003
+++ Mail/Field.pm	Sat Jan  4 08:25:03 2003
@@ -226,6 +226,9 @@
  my $self = shift;
  my $tag = ref($self) || $self;
 
+ # Bug in unicode \U, perl 5.8.0 breaks when casting utf8 in regex
+ utf8::downgrade($tag) if $] eq 5.008;
+
  $tag =~ s/.*:://o;
  $tag =~ s/_/-/og;
  $tag =~ s/\b([a-z]+)/\L\u$1/gio;
@@ -294,6 +297,9 @@
  unless(eval "require " . $pkg)
   {
    my $tag = $method;
+
+   # Bug in unicode \U, perl 5.8.0 breaks when casting utf8 in regex
+   utf8::downgrade($tag) if $] eq 5.008;
 
    $tag =~ s/_/-/og;
    $tag =~ s/\b([a-z]+)/\L\u$1/gio;
--- Mail/Address.pm.orig	Sat Jan  4 08:34:33 2003
+++ Mail/Address.pm	Sat Jan  4 08:34:35 2003
@@ -21,6 +21,9 @@
 sub _extract_name
 {
     local $_ = shift || '';
+
+    # Bug in unicode \U, perl 5.8.0 breaks when casing utf8 in regex
+    utf8::downgrade($_) if $] eq 5.008;
     
     # trim whitespace
     s/^\s+//;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://pallas.eruditorum.org/pipermail/rt-devel/attachments/20030104/41b1ac28/attachment.pgp


More information about the Rt-devel mailing list