in reply to Difference in sort order between Solaris and Linux

Hi,

All, thanks for the suggestions. I've tried them all. So, I can now confirm that:

  • The locales are installed on both servers (locale -a lists them on both)
  • I've put the setting of the locale in a BEGIN { .. } block
  • Just to make sure, I've tried other, installed locales, as well.
  • If I remove &use locale& from the Perl code, I can see sort behaving differently. So far as I'm concerned, the locale setting seems to be taken into account
  • For completeness, on Solaris the locale is called &en_US.ISO8859-1&, whilst on Linux it's called &en_US.iso88591&. Just to make sure I tried both names on both systems.
  • All to no avail I'm afraid.

    • Comment on Re: Difference in sort order between Solaris and Linux

    Replies are listed 'Best First'.
    Re^2: Difference in sort order between Solaris and Linux
    by McA (Priest) on Mar 05, 2014 at 13:44 UTC

      Hi,

      To your point "...If I remove &use locale& from the Perl code, I can see sort behaving differently...". Have you tried to call your script on both environments this way:

      LANG=C perl sortscript.pl

      What is the outcome in this case?

      McA

        Hi, Ok, just tried that. There's no difference in the outcome. To make sure I also double checked that the locale settings in the shell are set to the right iso8859 value.

          Now it would be interesting to see whether the commandline sort behaves similar. Put the words in a file per line and do a LANG=C sort file on both machines.

          McA