From: Ben Pfaff Date: Fri, 25 Feb 2011 05:01:31 +0000 (-0800) Subject: results2html: Properly encode output in UTF-8. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=158d2ead02f2573b26641de50ac5498a132ed01a;p=pspp results2html: Properly encode output in UTF-8. Otherwise quote marks appear as funny characters. --- diff --git a/results2html b/results2html index 4e3224fca3..a5a7688e5a 100755 --- a/results2html +++ b/results2html @@ -4,9 +4,13 @@ use strict; use warnings; use File::Spec; -use HTML::Entities; +use HTML::Entities qw(); use URI::Escape; +sub encode_entities { + return HTML::Entities::encode_entities($_[0], "<&>'\""); +} + my $gitweb_url = 'http://benpfaff.org/cgi-bin/gitweb.cgi?p=pspp;a=blob;f=[FILE];hb=[BRANCH]#l[LINE]'; open (LOG, '<', "LOG"); @@ -15,6 +19,7 @@ open (LOG_HTML, '>', "log.html"); print LOG_HTML < +