diff options
Diffstat (limited to 'draw.c')
| -rw-r--r-- | draw.c | 6 |
1 files changed, 1 insertions, 5 deletions
| @@ -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 | ||
| 168 | void | 167 | void |
| 169 | setfont(const char *fontstr) { | 168 | setfont(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]); |
