Skip to contentSkip to conversation

kconfig/nconf: Initialize the default locale at startup

PATCH Applied Jakub Horký 2 participants 2 messages Oct 14, 2025 – Nov 1, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 scripts/kconfig/nconf.c | 3 +++
 1 file changed, 3 insertions(+)
scripts/kconfig/nconf.c +3 -0
index ae1fe5f60327..198467d0edda 100644
@@ -10,6 +10,7 @@
 #include <string.h>
 #include <strings.h>
 #include <stdlib.h>
+#include <locale.h>
 
 #include <list.h>
 #include <xalloc.h>
@@ -1478,6 +1479,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);
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 5 lines · Jakub Horký

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.

Applied, thanks!

[1/1] kconfig/nconf: Initialize the default locale at startup

      https://git.kernel.org/kbuild/c/43c2931a95e6b

Best regards,

Signature · 1 line
Nathan Chancellor <[email protected]>