[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.6-44-gfc58510

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Oct 28 02:13:34 EDT 2009


The branch, 3.8-trunk has been updated
       via  fc5851034f891f9302fc82a0ce735f8bb7d16828 (commit)
      from  831d0a518146be36b4a331fee69bad364c054c70 (commit)

Summary of changes:
 share/html/Tools/Offline.html |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit fc5851034f891f9302fc82a0ce735f8bb7d16828
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Oct 28 14:11:37 2009 +0800

    we should try to decode uploaded template for offline

diff --git a/share/html/Tools/Offline.html b/share/html/Tools/Offline.html
index ce9f4ea..9086197 100644
--- a/share/html/Tools/Offline.html
+++ b/share/html/Tools/Offline.html
@@ -115,6 +115,9 @@ if ($ARGS{'Parse'} && $ARGS{'Template'}) {
     while ( my $bytesread = read( $fh, $buffer, 4096 ) ) {
 	    $template .= $buffer;
     }
+    my $encode = RT::I18N::_GuessCharset( $template );
+    require Encode;
+    $template = Encode::decode( $encode, $template );
     $template =~ s/\r\n/\n/gs;
     $action->Parse(Content => $template, Queue => $qname, Requestor => $requestoraddress);
     foreach ( @{ $action->{'create_tickets'} } ) {

-----------------------------------------------------------------------


More information about the Rt-commit mailing list