Commit fee79e01 authored by Harald Hoyer's avatar Harald Hoyer
Browse files

do not change console to non-unicode for LANG=C

If systemd-vconsole-setup was started with LANG=C (no locale.conf), then
it would set the console to non-unicode, which is not what we want.
parent ab06eef8
......@@ -5402,7 +5402,23 @@ bool is_locale_utf8(void) {
goto out;
}
cached_answer = streq(set, "UTF-8");
if(streq(set, "UTF-8")) {
cached_answer = true;
goto out;
}
/* For LC_CTYPE=="C" return true,
* because CTYPE is effectly unset and
* everything defaults to UTF-8 nowadays. */
set = setlocale(LC_CTYPE, NULL);
if (!set) {
cached_answer = true;
goto out;
}
cached_answer = streq(set, "C");
out:
return (bool)cached_answer;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment