UCS_to_most.pl: Process encodings in sorted order
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 19 Oct 2017 09:58:39 +0000 (05:58 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 19 Oct 2017 09:58:39 +0000 (05:58 -0400)
Otherwise the order depends on the Perl hash implementation, making it
cumbersome to scan the output when debugging.

src/backend/utils/mb/Unicode/UCS_to_most.pl

index 60431a6a27ea74a02d09514b7d7ccd4e0cd279a9..1c3922e2ffadda7dde722525aae4f84f61c90f13 100755 (executable)
@@ -50,7 +50,7 @@ my %filename = (
    'GBK'        => 'CP936.TXT');
 
 # make maps for all encodings if not specified
-my @charsets = (scalar(@ARGV) > 0) ? @ARGV : keys(%filename);
+my @charsets = (scalar(@ARGV) > 0) ? @ARGV : sort keys(%filename);
 
 foreach my $charset (@charsets)
 {