From 643b24914332240284adb01359c55406405a7e89 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 14 Oct 2021 18:45:19 +0200 Subject: [PATCH] word: workaround unicode breakage in edit subpage Prevent some perl/PLP quirkiness with encoded scalars. --- word.plp | 1 + word/edit.plp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/word.plp b/word.plp index 9fa1aaa..d1c0241 100644 --- 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; diff --git a/word/edit.plp b/word/edit.plp index d8de602..31fca23 100644 --- a/word/edit.plp +++ b/word/edit.plp @@ -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 => ['★', 'esperanto'], + eo => [qq'\N{BLACK STAR}', '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'], -- 2.30.0