@Bawolff, thank you for your help! And yes, you're right, other special pages are also affected on the Polish wiki; sorry, I didn't notice that before. I don't really understand though why ą doesn't work but ł in Specjalna:Zasady_haseł does work.
Oh, yeah, the namespace confusion in your example is pretty weird and I don't know why the talk page of ą gets forwarded to Ä. "Close enough!" ;)
Another OpenBSD user also seems to experience an issue with the ą. I tested it and <?php var_dump(preg_match('/^.{5,64}$/', 'daswązdas')); also returns int(0) for me while <?php var_dump(preg_match('/^.{5,64}$/', 'daswęzdas')); returns int(1).
The PCRE section of phpinfo() looks like this:
| PCRE (Perl Compatible Regular Expressions) Support | enabled |
| PCRE Library Version | 10.37 2021-05-26 |
| PCRE Unicode Version | 13.0.0 |
| PCRE JIT Support | not compiled in |
| Directive | Local Value | Master Value |
| pcre.backtrack_limit | 1000000 | 1000000 |
| pcre.recursion_limit | 100000 | 100000 |
PHP warnings are enabled but I didn't find anything in the logs.
I just upgraded from PHP 7.4.27 to PHP 7.4.28 but unfortunately, it didn't fix the problem.
I think I just wait for MediaWiki to be compatible with PHP 8 and see if that will solve the issue.
Thank you again for your kind help!
Cheers,
Till