On 2021-09-25 3:01 a.m., Smylers wrote:
That does look odd. Which locale are you running this under, which
version of Perl, and which version of Sort::Naturally?

Also, when I first ran your script I initially got lots of:

   Wide character in say at ./naturally line 23.

Adding this made Perl encode the output properly and the warning go
away:

   use open ':locale';

But that you didn't need to do that makes me think there's something
different about your set-up.

Also, even your ‘no locale, naturally’ line apparently*is*  affected by
the locale! With LC_COLLATE=C, I get:

   no locale,  naturally : 1 4 10 A a And and ant Any B b C c i X x Y y Z z Ä ä 
Äm än ÄND Äs Į į

"Curiouser and curiouser," said Alice. Yes, the last one is sorted by Unicode character codes.

My perl is v5.30.0. My Sort::Naturally is 1.03. And my environment is:

$ env|grep LC_|sort
LC_ADDRESS=en_CA.UTF-8
LC_IDENTIFICATION=en_CA.UTF-8
LC_MEASUREMENT=en_CA.UTF-8
LC_MONETARY=en_CA.UTF-8
LC_NAME=en_CA.UTF-8
LC_NUMERIC=en_CA.UTF-8
LC_PAPER=en_CA.UTF-8
LC_TELEPHONE=en_CA.UTF-8
LC_TIME=en_CA.UTF-8

Reply via email to