diff --git a/src/DateHandler/_DateHandler.py b/src/DateHandler/_DateHandler.py index 0a0728dc5..d82ee73b4 100644 --- a/src/DateHandler/_DateHandler.py +++ b/src/DateHandler/_DateHandler.py @@ -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]