[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.8-18-g8ff253d

Alex Vandiver alexmv at bestpractical.com
Wed Oct 15 19:53:25 EDT 2014


The branch, 4.2-trunk has been updated
       via  8ff253dd60c2c13ffd39342092dba69a4eb65efb (commit)
      from  9558804b61c127cf88bcad241b47ffe7498100dd (commit)

Summary of changes:
 devel/tools/rt-static-docs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 8ff253dd60c2c13ffd39342092dba69a4eb65efb
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Oct 15 15:15:29 2014 -0400

    Interpret README files as UTF-8
    
    Otherwise multi-byte characters get assumed to be latin-1, and are
    HTML-encoded as multiple such.

diff --git a/devel/tools/rt-static-docs b/devel/tools/rt-static-docs
index 613ba9d..35d2dc9 100755
--- a/devel/tools/rt-static-docs
+++ b/devel/tools/rt-static-docs
@@ -54,6 +54,7 @@ use File::Temp;
 use File::Spec;
 use File::Path qw(make_path rmtree);
 use File::Copy qw(copy);
+use Encode qw(decode_utf8);
 use HTML::Entities qw(encode_entities);
 use List::Util qw(first);
 use RT::Pod::HTMLBatch;
@@ -149,7 +150,7 @@ for my $file (<README* UPGRADING*>) {
         or warn "Can't open $file: $!", next;
 
     my $str = "";
-    $str .= encode_entities($_) while <$source>;
+    $str .= encode_entities(decode_utf8($_)) while <$source>;
     close $source;
 
     $str = "<pre>$str</pre>";

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


More information about the rt-commit mailing list