Improve fallback during locale initialization
authorKarl Williamson <public@khwilliamson.com>
Sat, 15 Feb 2014 20:23:36 +0000 (13:23 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sat, 15 Feb 2014 22:50:35 +0000 (15:50 -0700)
commit65ebb05984db179833ff252f547043f32184d893
tree01add0d78d2ea2ee30a4098977f5f1c943cf89f1
parent0e92a118111cc7fdf7a2bf58c8e45ef7b2b85ef4
Improve fallback during locale initialization

If Perl encounters a problem during startup trying to initialize the
locales from the environment it has immediately reverted to the "C"
locale.

This commit generalizes that so it tries each of the applicable
environment variables in order of priority until it works, or it gives
up and uses the "C" locale.  For example, if LC_ALL is set to something
that is invalid, but LANG is valid, LANG will be used.  This was
motivated by trying to get the Windows system default locale used in
preference to "C" if all else fails.
locale.c
pod/perldelta.pod
pod/perllocale.pod
t/run/locale.t