If UTF-8 is used in env variable LANG, wrong date handler might be loaded.
svn: r17093
This commit is contained in:
parent
4274ea16f5
commit
673de5d297
@ -58,6 +58,11 @@ LANG = ''
|
||||
if "LANG" in os.environ:
|
||||
LANG = os.environ["LANG"]
|
||||
|
||||
# If LANG contains ".UTF-8" use only the part to the left of "."
|
||||
# Otherwise some date handler will not load.
|
||||
if ".UTF-8" in LANG.upper():
|
||||
LANG = LANG.split(".")[0]
|
||||
|
||||
if not LANG:
|
||||
if not constfunc.win():
|
||||
LANG = locale.getlocale(locale.LC_TIME)[0]
|
||||
|
Loading…
Reference in New Issue
Block a user