dwm-meillo

changeset 617:ae5c3e06f7e2

using the portable Xmb+UTF-8 way of life, will see if this works well...
author arg@mig29
date Thu, 07 Dec 2006 09:47:55 +0100
parents f617c75a8405
children 567d70d132fa
files draw.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/draw.c	Wed Dec 06 11:19:06 2006 +0100
     1.2 +++ b/draw.c	Thu Dec 07 09:47:55 2006 +0100
     1.3 @@ -167,14 +167,16 @@
     1.4  
     1.5  void
     1.6  setfont(const char *fontstr) {
     1.7 -	char **missing, *def;
     1.8 +	char *def, *lc, **missing;
     1.9  	int i, n;
    1.10  
    1.11 -	setlocale(LC_CTYPE, "");
    1.12 +	lc = setlocale(LC_CTYPE, NULL);
    1.13 +	setlocale(LC_CTYPE, "UTF-8");
    1.14  	missing = NULL;
    1.15  	if(dc.font.set)
    1.16  		XFreeFontSet(dpy, dc.font.set);
    1.17  	dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def);
    1.18 +	setlocale(LC_CTYPE, lc);
    1.19  	if(missing) {
    1.20  		while(n--)
    1.21  			fprintf(stderr, "missing fontset: %s\n", missing[n]);