summaryrefslogtreecommitdiffstats
path: root/draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/draw.c b/draw.c
index 2dcafe1..eeb3e56 100644
--- a/draw.c
+++ b/draw.c
@@ -2,7 +2,6 @@
2 * See LICENSE file for license details. 2 * See LICENSE file for license details.
3 */ 3 */
4#include "dwm.h" 4#include "dwm.h"
5#include <locale.h>
6#include <stdio.h> 5#include <stdio.h>
7#include <string.h> 6#include <string.h>
8 7
@@ -167,16 +166,13 @@ getcolor(const char *colstr) {
167 166
168void 167void
169setfont(const char *fontstr) { 168setfont(const char *fontstr) {
170 char *def, *lc, **missing; 169 char *def, **missing;
171 int i, n; 170 int i, n;
172 171
173 lc = setlocale(LC_CTYPE, NULL);
174 setlocale(LC_CTYPE, "UTF-8");
175 missing = NULL; 172 missing = NULL;
176 if(dc.font.set) 173 if(dc.font.set)
177 XFreeFontSet(dpy, dc.font.set); 174 XFreeFontSet(dpy, dc.font.set);
178 dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def); 175 dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def);
179 setlocale(LC_CTYPE, lc);
180 if(missing) { 176 if(missing) {
181 while(n--) 177 while(n--)
182 fprintf(stderr, "missing fontset: %s\n", missing[n]); 178 fprintf(stderr, "missing fontset: %s\n", missing[n]);