word: workaround unicode breakage in edit subpage
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 14 Oct 2021 16:45:19 +0000 (18:45 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 25 Oct 2021 14:33:21 +0000 (16:33 +0200)
Prevent some perl/PLP quirkiness with encoded scalars.

word.plp
word/edit.plp

index 9fa1aaaf87c7b7987c5d0e5c6cf39b45a64d2193..d1c0241bbf93425892807bf238b1e3c14277813e 100644 (file)
--- a/word.plp
+++ b/word.plp
@@ -2,6 +2,7 @@
 
 if ($Request and $Request =~ m{\A([^/]+)}) {
        my $page = "word/$1.plp";
+       utf8::downgrade($page); # unicode filename breaks contents encoding
        if (-e $page) {
                Include $page;
                exit;
index d8de60249c7a54945d048885acc4fb747d87357a..31fca23384ad2912aeae73fe723751a965252576 100644 (file)
@@ -73,7 +73,7 @@ my $user = eval {
 my %lang = (
        nl => ["\N{REGIONAL INDICATOR SYMBOL LETTER N}\N{REGIONAL INDICATOR SYMBOL LETTER L}", 'nederlands'],
        en => ["\N{REGIONAL INDICATOR SYMBOL LETTER G}\N{REGIONAL INDICATOR SYMBOL LETTER B}", 'english'],
-       eo => ['<span style="color:green">★</span>', 'esperanto'],
+       eo => [qq'<span style="color:green">\N{BLACK STAR}</span>', 'esperanto'],
        ru => ["\N{REGIONAL INDICATOR SYMBOL LETTER R}\N{REGIONAL INDICATOR SYMBOL LETTER U}", 'русский'],
        zh => ["\N{REGIONAL INDICATOR SYMBOL LETTER C}\N{REGIONAL INDICATOR SYMBOL LETTER N}", '中文'],
        la => ["\N{PUSHPIN}", 'latin'],