From 3bcb9f02e4e905b9fd12fa2401858445111e8617 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 9 Dec 2010 00:06:55 +0100 Subject: [PATCH] source: preserve utf8 of unhighlighted input PLP::ReadFile() is declared before open mode can be set to :utf8, so may cause corruption if not converted back to unicode. --- source.plp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source.plp b/source.plp index 83a5833..ee129ce 100644 --- a/source.plp +++ b/source.plp @@ -76,7 +76,10 @@ else { print "\n"; } else { - print "
\n", EscapeHTML(ReadFile($source)), "
\n"; + require Encode; + print "
\n";
+		print EscapeHTML(Encode::decode_utf8(ReadFile($source)));
+		print "
\n"; } print "\n"; -- 2.30.0