Skip to content

Commit 3927c4a

Browse files
Jakub Horkýnathanchance
authored andcommitted
kconfig/mconf: Initialize the default locale at startup
Fix bug where make menuconfig 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/20251014154933.3990990-1-jakub.git@horky.net [nathan: Alphabetize locale.h include] Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent cf20852 commit 3927c4a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/kconfig/mconf.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <errno.h>
1313
#include <fcntl.h>
1414
#include <limits.h>
15+
#include <locale.h>
1516
#include <stdarg.h>
1617
#include <stdlib.h>
1718
#include <string.h>
@@ -931,6 +932,8 @@ int main(int ac, char **av)
931932

932933
signal(SIGINT, sig_handler);
933934

935+
setlocale(LC_ALL, "");
936+
934937
if (ac > 1 && strcmp(av[1], "-s") == 0) {
935938
silent = 1;
936939
/* Silence conf_read() until the real callback is set up */

0 commit comments

Comments
 (0)