diff options
| author | arg@mig29 <unknown> | 2006-12-07 10:02:46 +0100 |
|---|---|---|
| committer | arg@mig29 <unknown> | 2006-12-07 10:02:46 +0100 |
| commit | d42c3ba2dc249a77f1f2417a1c72a3b7744fd932 (patch) | |
| tree | 90029cbcfba6836bbfec3aaa2a6bf2ea15eb4308 /draw.c | |
| parent | don't use Xlocale crap, let's use locale.h instead (diff) | |
| download | dwm-d42c3ba2dc249a77f1f2417a1c72a3b7744fd932.tar.gz dwm-d42c3ba2dc249a77f1f2417a1c72a3b7744fd932.zip | |
with this patch everything works fine for me
Diffstat (limited to '')
| -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]); |
