diff options
| author | Jakub Horký <jakub.git@horky.net> | 2025-10-14 17:44:06 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-12-01 13:41:50 +0300 |
| commit | d0141cf6ab1fa80fa3b3928c12369a44ea784332 (patch) | |
| tree | cc40ebfa9578a3265df591d516e6e070b776e1c8 /scripts | |
| parent | be46fa4de9dad39a84f38a37d0b134146ec175a2 (diff) | |
| download | linux-d0141cf6ab1fa80fa3b3928c12369a44ea784332.tar.xz | |
kconfig/nconf: Initialize the default locale at startup
[ Upstream commit 43c2931a95e6b295bfe9e3b90dbe0f7596933e91 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/kconfig/nconf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index 7a17c94a1594..a7cfa6813c63 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -7,6 +7,7 @@ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif +#include <locale.h> #include <string.h> #include <strings.h> #include <stdlib.h> @@ -1569,6 +1570,8 @@ int main(int ac, char **av) int lines, columns; char *mode; + setlocale(LC_ALL, ""); + if (ac > 1 && strcmp(av[1], "-s") == 0) { /* Silence conf_read() until the real callback is set up */ conf_set_message_callback(NULL); |
