On Sun Sep 27 07:36:35 2020, ROBIN wrote:
Show quoted text> Sorry. That'll teach me to apply a patch without testing it properly.
Same goes for my submission...
Here is what I found out:
Prior to perl-5.18.4 there was no PadnameUTF8 macro (so I decided that the fix should not target such older versions):
https://github.com/Perl/perl5/commit/35e035ccb58e33947405288b1177fb0b9c1da197
Macro was added as "PADNAME_UTF8"
https://github.com/Perl/perl5/commit/86d2498c0b3132b9d76f935b317b213effc43990
Macro was renamed to PadnameUTF8
(and appears this way in perl-5.18.4)
https://github.com/Perl/perl5/commit/2502ffdfca07fac6972c9b2da7ae160d011c2877
Macro always returns true
(and appears this way in perl-5.22.4)
I'm attaching an improved patch, which is intended to keep the behavior unchanged for Perl versions prior to 5.22.4, and fixed starting from 5.22.4. With earlier versions of Perl the behavior is broken and I see no way to fix, e.g. even after the macro was introduced, the ü is converted for some reason to uppercase Ü in perl-5.18.4, and before that to à in perl-5.10.0. perl-5.10.0 however is able to unexpectedly accept a Latin-1 encoded ü together with the "use utf8" macro and then kinda works, leaving the ü unchanged. So I guess we should not hope for making it right with old versions of Perl, but of course keep backward compatibility.