reverted setlocale() call
3e60c5d8
1 file(s) · +2 −1
| 1 | 1 | /* See LICENSE file for copyright and license details. */ |
|
| 2 | 2 | #define _BSD_SOURCE |
|
| 3 | 3 | #include <ctype.h> |
|
| 4 | + | #include <locale.h> |
|
| 4 | 5 | #include <stdarg.h> |
|
| 5 | 6 | #include <stdio.h> |
|
| 6 | 7 | #include <stdlib.h> |
|
| 705 | 706 | else |
|
| 706 | 707 | eprint("usage: dmenu [-i] [-b] [-fn <font>] [-nb <color>] [-nf <color>]\n" |
|
| 707 | 708 | " [-p <prompt>] [-sb <color>] [-sf <color>] [-v]\n"); |
|
| 708 | - | if(!XSupportsLocale()) |
|
| 709 | + | if(!setlocale(LC_CTYPE, "") || !XSupportsLocale()) |
|
| 709 | 710 | fprintf(stderr, "warning: no locale support\n"); |
|
| 710 | 711 | if(!(dpy = XOpenDisplay(0))) |
|
| 711 | 712 | eprint("dmenu: cannot open display\n"); |
|