Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kconfig: nconfig: fix multi-byte UTF handling

Currently, Kconfig descriptions that use multi-byte UTF-8 characters
(such as MTD_NAND_CAFE) will have their menu entries dropped from the
'make nconfig' ncurses menu, and all subsequent entries in the same
window will be omitted. This seems to be due to the ncurses 'menu'
library, which does not traditionally handle UTF-8 >8-bit characters
properly.

The ncursesw library ('w' is for "wide") is written to handle these
UTF-8 characters, and is practically a drop-in replacement at the source
level. Use it by default, if available.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=43067
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Martin Walch <walch.martin@web.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>

authored by

Brian Norris and committed by
Michal Marek
7285996a c40724d3

+2 -1
+2 -1
scripts/kconfig/Makefile
··· 191 191 HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) 192 192 193 193 HOSTLOADLIBES_nconf = $(shell \ 194 - pkg-config --libs menu panel ncurses 2>/dev/null \ 194 + pkg-config --libs menuw panelw ncursesw 2>/dev/null \ 195 + || pkg-config --libs menu panel ncurses 2>/dev/null \ 195 196 || echo "-lmenu -lpanel -lncurses" ) 196 197 $(obj)/qconf.o: $(obj)/.tmp_qtcheck 197 198