]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/vconsole/vconsole-setup.c
util: add is_locale_utf8()
[thirdparty/systemd.git] / src / vconsole / vconsole-setup.c
index 6e016ad338675714a6c5cf496d0ad200c31688d5..cb7ade0d245bbc1a020125c3fbed265610c18755 100644 (file)
@@ -29,8 +29,6 @@
 #include <stdbool.h>
 #include <stdarg.h>
 #include <limits.h>
-#include <locale.h>
-#include <langinfo.h>
 #include <sys/ioctl.h>
 #include <sys/wait.h>
 #include <linux/tiocl.h>
@@ -48,19 +46,6 @@ static bool is_vconsole(int fd) {
         return ioctl(fd, TIOCLINUX, data) >= 0;
 }
 
-static bool is_locale_utf8(void) {
-        const char *set;
-
-        if (!setlocale(LC_ALL, ""))
-                return true;
-
-        set = nl_langinfo(CODESET);
-        if (!set)
-                return true;
-
-        return streq(set, "UTF-8");
-}
-
 static int disable_utf8(int fd) {
         int r = 0, k;