dwm-meillo
changeset 619:bda4880c462d
with this patch everything works fine for me
author | arg@mig29 |
---|---|
date | Thu, 07 Dec 2006 10:02:46 +0100 |
parents | 567d70d132fa |
children | 842fe159a28e |
files | draw.c main.c |
diffstat | 2 files changed, 3 insertions(+), 5 deletions(-) [+] |
line diff
1.1 --- a/draw.c Thu Dec 07 09:49:45 2006 +0100 1.2 +++ b/draw.c Thu Dec 07 10:02:46 2006 +0100 1.3 @@ -2,7 +2,6 @@ 1.4 * See LICENSE file for license details. 1.5 */ 1.6 #include "dwm.h" 1.7 -#include <locale.h> 1.8 #include <stdio.h> 1.9 #include <string.h> 1.10 1.11 @@ -167,16 +166,13 @@ 1.12 1.13 void 1.14 setfont(const char *fontstr) { 1.15 - char *def, *lc, **missing; 1.16 + char *def, **missing; 1.17 int i, n; 1.18 1.19 - lc = setlocale(LC_CTYPE, NULL); 1.20 - setlocale(LC_CTYPE, "UTF-8"); 1.21 missing = NULL; 1.22 if(dc.font.set) 1.23 XFreeFontSet(dpy, dc.font.set); 1.24 dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def); 1.25 - setlocale(LC_CTYPE, lc); 1.26 if(missing) { 1.27 while(n--) 1.28 fprintf(stderr, "missing fontset: %s\n", missing[n]);
2.1 --- a/main.c Thu Dec 07 09:49:45 2006 +0100 2.2 +++ b/main.c Thu Dec 07 10:02:46 2006 +0100 2.3 @@ -4,6 +4,7 @@ 2.4 2.5 #include "dwm.h" 2.6 #include <errno.h> 2.7 +#include <locale.h> 2.8 #include <stdio.h> 2.9 #include <stdlib.h> 2.10 #include <string.h> 2.11 @@ -240,6 +241,7 @@ 2.12 } 2.13 else if(argc != 1) 2.14 eprint("usage: dwm [-v]\n"); 2.15 + setlocale(LC_CTYPE, ""); 2.16 dpy = XOpenDisplay(0); 2.17 if(!dpy) 2.18 eprint("dwm: cannot open display\n");