From: Jakub Horký Date: Tue, 14 Oct 2025 15:49:32 +0000 (+0200) Subject: kconfig/mconf: Initialize the default locale at startup X-Git-Tag: v6.18-rc4~8^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3927c4a1084c48ef97f11281a0a43ecb2cb4d6f1;p=thirdparty%2Fkernel%2Flinux.git 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ý Link: https://patch.msgid.link/20251014154933.3990990-1-jakub.git@horky.net [nathan: Alphabetize locale.h include] Signed-off-by: Nathan Chancellor --- diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 84ea9215c0a7..b8b7bba84a65 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -931,6 +932,8 @@ int main(int ac, char **av) signal(SIGINT, sig_handler); + setlocale(LC_ALL, ""); + if (ac > 1 && strcmp(av[1], "-s") == 0) { silent = 1; /* Silence conf_read() until the real callback is set up */