Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: 0fe48720193fff589686a091880b8bcf7c58a54b https://github.com/Perl/perl5/commit/0fe48720193fff589686a091880b8bcf7c58a54b Author: Karl Williamson <k...@cpan.org> Date: 2024-04-26 (Fri, 26 Apr 2024)
Changed paths: M ext/POSIX/POSIX.xs M ext/POSIX/lib/POSIX.pm M locale.c M perl.h Log Message: ----------- Don't output msg for harmless use of unsupported locale This fixes GH #21562 Perl doesn't support all possible locales. Locales that remap elements of the ASCII character set or change their case pairs won't work fully, for example. Hence, some Turkish locales arent supported because Turkish has different behavior in regard to 'I' and 'i' than other locales that use the Latin alphabet. The only multi-byte locales that perl supports are UTF-8 ones (and there actually is special handling here to support Turkish). Other multi-byte locales can be dangerous to use, possibly crashing or hanging the Perl interpreter. Locales with shift states are particularly prone to this. Since perl is written in C, there is always an underlying locale. But most C functions don't look at locales at all, and the Perl interpreter takes care to call the ones that do only within the scope of 'use locale' or for certain function calls in the POSIX:: module that always use the program's current underlying locale. Prior to this commit, if a dangerous locale underlied the program at startup, a warning to that effect was emitted, even if that locale never gets accessed. This commit changes things so that no warning is output until and if the dangerous underlying locale is actually attempted to be used. Pre-existing code also deferred warnings about locales (like the Turkish ones mentioned above) that aren't fully compatible with perl. So it was a simple matter to just modify this code a bit, and add some extra checks for sane locales being in effect To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications