Skip to content

Commit 43c2931

Browse files
Jakub Horkýnathanchance
authored andcommitted
kconfig/nconf: Initialize the default locale at startup
Fix bug where make nconfig doesn't initialize the default locale, which causes ncurses menu borders to be displayed incorrectly (lqqqqk) in UTF-8 terminals that don't support VT100 ACS by default, such as PuTTY. Signed-off-by: Jakub Horký <jakub.git@horky.net> Link: https://patch.msgid.link/20251014144405.3975275-2-jakub.git@horky.net [nathan: Alphabetize locale.h include] Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent 3927c4a commit 43c2931

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/kconfig/nconf.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#ifndef _GNU_SOURCE
88
#define _GNU_SOURCE
99
#endif
10+
#include <locale.h>
1011
#include <string.h>
1112
#include <strings.h>
1213
#include <stdlib.h>
@@ -1478,6 +1479,8 @@ int main(int ac, char **av)
14781479
int lines, columns;
14791480
char *mode;
14801481

1482+
setlocale(LC_ALL, "");
1483+
14811484
if (ac > 1 && strcmp(av[1], "-s") == 0) {
14821485
/* Silence conf_read() until the real callback is set up */
14831486
conf_set_message_callback(NULL);

0 commit comments

Comments
 (0)