fix text mode KeyError crash (#804483)
anaconda didn't know how to deal with LANG=C. So if we have LANG=C, just treat it like we had no LANG set: reset to DEFAULT_LANG. Just to be sure, use TTYReset=yes in anaconda.service, which will make systemd reset the terminal to sane (and unicode-ready) settings. Finally, emit the magic control sequence to set UTF-8 output, which fixes the line-drawing characters in text-mode virtual terminals. --- anaconda | 5 +++++ data/systemd/anaconda.service | 3 ++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/anaconda b/anaconda index 4fcc6b8..ae23d4f 100755 --- a/anaconda +++ b/anaconda @@ -643,6 +643,11 @@ if __name__ == "__main__": iutil.execWithRedirect("localedef", ["-i", deflang, "-f", defcode, DEFAULT_LANG]) + # to set UTF8 mode on the terminal, we need LANG to be set usefully + if os.environ.get("LANG", "C") == "C": + os.environ['LANG'] = DEFAULT_LANG + print " |