sciurius has asked for the wisdom of the Perl Monks concerning the following question:
On Windows, I get#! perl use strict; use warnings; use utf8; binmode STDOUT => ':utf8'; my @words = ( "Maria Lenore", "Mária Helena", "María Dolores" ); my @sorted = sort @words; if ( "@sorted" eq "María Dolores Mária Helena Maria Lenore" ) { print("Sorted OK\n"); } elsif ( "@sorted" eq "Maria Lenore María Dolores Mária Helena" ) { print("Sorted C (ASCII)\n"); } else { print("Sort failed: @sorted\n"); }
Same on macOS.PS C:\Users\Johan> perl locale.pl Sorted C (ASCII) PS C:\Users\Johan> perl -Mlocale locale.pl Sorted C (ASCII) PS C:\Users\Johan>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using system sort order
by Arunbear (Prior) on Aug 11, 2025 at 11:58 UTC | |
by sciurius (Beadle) on Aug 11, 2025 at 14:31 UTC | |
Re: Using system sort order
by 1nickt (Canon) on Aug 11, 2025 at 10:30 UTC | |
by ysth (Canon) on Aug 11, 2025 at 17:17 UTC |