public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] kconfig: fix multi-byte UTF handling in nconfig
@ 2014-06-04  7:52 Brian Norris
  2014-06-04  7:52 ` [PATCH 1/2] kconfig: lxdialog: fix spelling Brian Norris
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Brian Norris @ 2014-06-04  7:52 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Brian Norris, Yann E. MORIN, Artem Bityutskiy

Hi,

The first patch is trivial.

The second is inspired by a long-standing bugzilla entry:

  https://bugzilla.kernel.org/show_bug.cgi?id=43067

The MTD_NAND_CAFE Kconfig symbol (drivers/mtd/nand/Kconfig) has description
text which uses a multi-byte UTF-8 character: the 'É' in 'CAFÉ'. This
character (and other similar >8bit UTF-8 characters) is not handled
correctly by many of the kernel configuration tools (notably 'make nconfig'
and 'make xconfig'). nconfig was especially broken, as it would completely
drop any menu entry which had non-ASCII characters, as well as ALL
subsequent entries in the same window (!!).

The fix for nconfig is to allow linking against the "wide" ncurses library.
I did not bother learning QT well enough to fix 'make xconfig'; it still
appears broken w.r.t. wide characters, and makes liberal use of the
QString::latin1() conversion for potentially non-Latin strings.

Notably, this issue is not very obvious for the common user. For instance,
on Ubuntu one might install libncurses5-dev, which is sufficient for getting
'menuconfig' to compile/link/run just fine. It is easy to miss the fact that
unicode handling is incorrect, because the behavior is undefined (usually
just chunk characters, but nconfig just silently drops data), and nothing
informs them that they should have installed libncursesw5-dev instead.

Ideally, we could drop support for linking against legacy ncurses, and
instead require ncursesw, but that might be painful to enforce for all users
(i.e., nearly everyone who configures kernels). I welcome any thoughts on
improving this state for others (like me, for a long time) who don't realize
that they should install the ncursesw development package in order to get
21st century support for unicode help text.

Brian

Brian Norris (2):
  kconfig: lxdialog: fix spelling
  kconfig: nconfig: fix multi-byte UTF handling

 scripts/kconfig/Makefile          |    3 ++-
 scripts/kconfig/lxdialog/dialog.h |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-08-24  5:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-04  7:52 [PATCH 0/2] kconfig: fix multi-byte UTF handling in nconfig Brian Norris
2014-06-04  7:52 ` [PATCH 1/2] kconfig: lxdialog: fix spelling Brian Norris
2014-06-04  7:52 ` [PATCH 2/2] kconfig: nconfig: fix multi-byte UTF handling Brian Norris
2014-06-06 13:18   ` Sam Ravnborg
2014-06-05  1:53 ` [PATCH 0/2] kconfig: fix multi-byte UTF handling in nconfig Martin Walch
2014-06-06 13:16   ` Sam Ravnborg
2014-06-06 13:17 ` Sam Ravnborg
2014-07-10  8:52 ` Brian Norris
2014-08-20 16:40   ` Brian Norris
2014-08-22 11:02     ` Michal Marek
2014-08-24  5:17       ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox