X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Flib%2FRT%2FI18N.pm;fp=rt%2Flib%2FRT%2FI18N.pm;h=a1a03093e7a5f2a85f11c0903fcb32ef73f8cbb3;hp=60a66222dda73a7477e07290a27da1abb72eec40;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=b226bc6bd81f999176cdbfa53a799033ff0a0307 diff --git a/rt/lib/RT/I18N.pm b/rt/lib/RT/I18N.pm index 60a66222d..a1a03093e 100644 --- a/rt/lib/RT/I18N.pm +++ b/rt/lib/RT/I18N.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -56,6 +56,7 @@ package RT::I18N; use strict; use warnings; +use Cwd (); use Locale::Maketext 1.04; @@ -97,10 +98,10 @@ sub Init { @lang = ('*') unless @lang; # load default functions - require substr(__FILE__, 0, -3) . '/i_default.pm'; + require substr(Cwd::abs_path(__FILE__), 0, -3) . '/i_default.pm'; # Load language-specific functions - foreach my $file ( File::Glob::bsd_glob(substr(__FILE__, 0, -3) . "/*.pm") ) { + foreach my $file ( File::Glob::bsd_glob(substr(Cwd::abs_path(__FILE__), 0, -3) . "/*.pm") ) { my ($lang) = ($file =~ /([^\\\/]+?)\.pm$/); next unless grep $_ eq '*' || $_ eq $lang, @lang; require $file; @@ -442,11 +443,9 @@ sub _DecodeMIMEWordsToEncoding { $charset = _CanonicalizeCharset($charset); $encoding = lc $encoding; - $trailing =~ s/\s?\t?$//; # Observed from Outlook Express - if ( $encoding eq 'q' ) { use MIME::QuotedPrint; - $enc_str =~ tr/_/ /; # Observed from Outlook Express + $enc_str =~ tr/_/ /; # RFC 2047, 4.2 (2) $enc_str = decode_qp($enc_str); } elsif ( $encoding eq 'b' ) { use MIME::Base64;