summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJakub Horký <jakub.git@horky.net>2025-10-14 17:49:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-12-07 06:09:31 +0900
commit87297ab1e7833e3da175599c55c068dc25ff6753 (patch)
treef10dcee76d625ac819a6cb07361b2a60f34c0f95 /scripts
parent699c6cc0f18e294e5adeb687da755e28ec75a04a (diff)
downloadlinux-87297ab1e7833e3da175599c55c068dc25ff6753.tar.gz
linux-87297ab1e7833e3da175599c55c068dc25ff6753.tar.bz2
linux-87297ab1e7833e3da175599c55c068dc25ff6753.zip
kconfig/mconf: Initialize the default locale at startup
[ Upstream commit 3927c4a1084c48ef97f11281a0a43ecb2cb4d6f1 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/mconf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 9d3cf510562f..0649ff35ec5c 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
+#include <locale.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
@@ -1005,6 +1006,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 */