[Rt-commit] rt branch, 4.4/require-han-extra-in-attachment-encoded-headers, repushed

? sunnavy sunnavy at bestpractical.com
Fri Dec 14 15:54:54 EST 2018


The branch 4.4/require-han-extra-in-attachment-encoded-headers was deleted and repushed:
       was c1b100ae408f04619a325b9d5db50ff98cb5421a
       now 6da469b84f9d556ed1aacba7e39e1fbd0c081bf5

1: 571f6090b8 ! 1: 80c77a13f7 Require Encode::HanExtra in RT::Attachment::EncodedHeaders when necessary
    @@ -13,9 +13,12 @@
      sub EncodedHeaders {
          my $self = shift;
          my $encoding = shift || 'utf8';
    -+    if ( $encoding =~ /^(?:(?:big5(-1984|-2003|ext|plus))|cccii|unisys|euc-tw|gb18030|(?:cns11643-\d+))$/ ) {
    ++
    ++    # Require Encode::HanExtra to handle more encodings it supports.
    ++    # The regex is based on the names documented in Encode::HanExtra.
    ++    if ( $encoding =~ /^(?:big5(?:-1984|-2003|ext|plus)|cccii|cns11643-[1-7f]|euc-tw|gb18030|unisys(?:-sosi(?:1|2))?)$/ ) {
     +        unless ( Encode::HanExtra->require ) {
    -+            RT->Logger->error("Please install Encode::HanExtra to handle $encoding");
    ++            RT->Logger->error("Need Encode::HanExtra to handle $encoding");
     +        }
     +    }
          return Encode::encode( $encoding, $self->Headers );
2: c1b100ae40 ! 2: 6da469b84f Test RT::Attachment::EncodedHeaders with gb18030
    @@ -1,18 +1,6 @@
     Author: sunnavy <sunnavy at bestpractical.com>
     
         Test RT::Attachment::EncodedHeaders with gb18030
    -
    -diff --git a/t/check-modules b/t/check-modules
    -new file mode 100755
    ---- /dev/null
    -+++ b/t/check-modules
    -@@
    -+#!/usr/bin/env perl
    -+use strict;
    -+use warnings;
    -+
    -+use UNIVERSAL::require;
    -+$_->require or die $@ for @ARGV;
     
     diff --git a/t/data/emails/new-ticket-from-gb18030 b/t/data/emails/new-ticket-from-gb18030
     new file mode 100644
    @@ -42,8 +30,7 @@
     +
     +# we can't simply call Encode::HanExtra->require here because we are testing
     +# if Encode::HanExtra could be automatically loaded.
    -+my $check_modules = RT::Test::get_relocatable_file( 'check-modules', File::Spec->updir() );
    -+plan skip_all => 'Encode::HanExtra required' if system $^X, $check_modules, 'Encode::HanExtra';
    ++plan skip_all => 'Encode::HanExtra required' if system $^X, '-MEncode::HanExtra', '-e1';
     +
     +my ( $baseurl, $m ) = RT::Test->started_ok;
     +



More information about the rt-commit mailing list