using the portable Xmb+UTF-8 way of life, will see if this works well...
857d825e
1 file(s) · +4 −2
| 167 | 167 | ||
| 168 | 168 | void |
|
| 169 | 169 | setfont(const char *fontstr) { |
|
| 170 | - | char **missing, *def; |
|
| 170 | + | char *def, *lc, **missing; |
|
| 171 | 171 | int i, n; |
|
| 172 | 172 | ||
| 173 | - | setlocale(LC_CTYPE, ""); |
|
| 173 | + | lc = setlocale(LC_CTYPE, NULL); |
|
| 174 | + | setlocale(LC_CTYPE, "UTF-8"); |
|
| 174 | 175 | missing = NULL; |
|
| 175 | 176 | if(dc.font.set) |
|
| 176 | 177 | XFreeFontSet(dpy, dc.font.set); |
|
| 177 | 178 | dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def); |
|
| 179 | + | setlocale(LC_CTYPE, lc); |
|
| 178 | 180 | if(missing) { |
|
| 179 | 181 | while(n--) |
|
| 180 | 182 | fprintf(stderr, "missing fontset: %s\n", missing[n]); |