about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--draw.c6
-rw-r--r--main.c2
2 files changed, 3 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 @@
  * See LICENSE file for license details.
  */
 #include "dwm.h"
-#include <locale.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -167,16 +166,13 @@ getcolor(const char *colstr) {
 
 void
 setfont(const char *fontstr) {
-	char *def, *lc, **missing;
+	char *def, **missing;
 	int i, n;
 
-	lc = setlocale(LC_CTYPE, NULL);
-	setlocale(LC_CTYPE, "UTF-8");
 	missing = NULL;
 	if(dc.font.set)
 		XFreeFontSet(dpy, dc.font.set);
 	dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def);
-	setlocale(LC_CTYPE, lc);
 	if(missing) {
 		while(n--)
 			fprintf(stderr, "missing fontset: %s\n", missing[n]);
diff --git a/main.c b/main.c
index cde7e46..c42d1ff 100644
--- a/main.c
+++ b/main.c
@@ -4,6 +4,7 @@
 
 #include "dwm.h"
 #include <errno.h>
+#include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -240,6 +241,7 @@ main(int argc, char *argv[]) {
 	}
 	else if(argc != 1)
 		eprint("usage: dwm [-v]\n");
+	setlocale(LC_CTYPE, "");
 	dpy = XOpenDisplay(0);
 	if(!dpy)
 		eprint("dwm: cannot open display\n");
selm R. Garbe <garbeam@wmii.de> 2006-07-16 23:26:50 +0200 simplified man page' href='/acidbong/suckless/dwm/commit/dwm.1?id=0c3544d42fba23b99a07cf18f35ae25a3121765f'>0c3544d ^
e6cbe9c ^
e743836 ^
7b5638f ^
0c3544d ^


901b3ed ^
1076f2b

901b3ed ^
0c3544d ^
72655f0 ^





901b3ed ^
72655f0 ^
3af6434 ^
72655f0 ^
3af6434 ^
72655f0 ^




3af6434 ^







72655f0 ^





3af6434 ^
72655f0 ^

7b5638f ^





1549faf ^


3af6434 ^

1549faf ^









ba59bc8 ^
1549faf ^
3af6434 ^

1549faf ^
0c3544d ^
0e5c819 ^












0c3544d ^

3af6434 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109