From: Harald Hoyer <[email protected]>
If you have a ASCII only terminal, there is no way to set the charmap to
ANSI_X3.4-1968, other than using LC_CTYPE=C.
We don't want to assume a UTF-8 capable terminal in this case and only
do so, if LANG, LC_ALL and LC_CTYPE are unset.
---
src/shared/util.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/shared/util.c b/src/shared/util.c
index 04811ff..c4b644b 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -5387,6 +5387,10 @@ bool is_locale_utf8(void) {
cached_answer = streq(set, "C");
+ /* LC_CTYPE=="C", now check, if it was set by purpose */
+ if (cached_answer && (getenv("LC_ALL") || getenv("LC_CTYPE") ||
getenv("LANG")))
+ cached_answer = false;
+
out:
return (bool)cached_answer;
}
--
1.8.3.1
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel