summaryrefslogtreecommitdiff
path: root/src/utf8.c
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-09-17 22:09:19 +0200
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-09-17 22:09:19 +0200
commit5d76519869e4bf188f748e487e083ef394e384a9 (patch)
tree912123cb076086cd74302cb4e9d62b0bff284ee0 /src/utf8.c
parent02b994196fde275a724ba767c115204ca34414e9 (diff)
downloadratpoison-5d76519869e4bf188f748e487e083ef394e384a9.zip
Move utf8_locale setting in utf8.c
Less goo in main.c
Diffstat (limited to 'src/utf8.c')
-rw-r--r--src/utf8.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/utf8.c b/src/utf8.c
index bb53d57..c15e5c1 100644
--- a/src/utf8.c
+++ b/src/utf8.c
@@ -1,3 +1,16 @@
-#include "utf8.h"
+#include "ratpoison.h"
+
+#ifdef HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
int utf8_locale;
+
+int
+utf8_check_locale(void)
+{
+#ifdef HAVE_LANGINFO_CODESET
+ utf8_locale = !strcmp (nl_langinfo (CODESET), "UTF-8");
+#endif
+ return utf8_locale;
+}