Link against ncursesw

Stanislav Ochotnicky sochotnicky at
Fri Jul 22 14:30:51 CEST 2011

Fedora recently received a valid bugreport [1] showing problems with
pinentry-curses and  UTF-8 descriptions (most visible when someone has
UTF-8 in their gnupg names). Most simple reproducer is:

$ pinentry-curses
OK Your orders please
option lc-ctype=pl_PL.UTF-8
setdesc ąćęłńóśźżĄĆĘŁŃÓŚŹŻ
[pinentry shows garbled text in curses]

I prepared a patch that fixes this (attached), but I am not entirely
convinced it's the proper fix. That's mainly because I just replaced
ncurses linking with ncursesw. This is fine for most desktop systems
that have wide-char ncurses, but I assume there might be systems you
want to support without ncursesw.

Proper way to deal with this would probably be to fallback like this:
ncursesw -> ncurses -> curses

Apart from this does adding setlocale(LC_CTYPE, "") call seem


Stanislav Ochotnicky <sochotnicky at>
Software Engineer - Base Operating Systems Brno

PGP: 7B087241
Red Hat Inc.                     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Link-against-ncursesw-and-fix-display-of-wide-charac.patch
Type: application/octet-stream
Size: 1630 bytes
Desc: not available
URL: </pipermail/attachments/20110722/1daccd48/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: </pipermail/attachments/20110722/1daccd48/attachment-0001.pgp>

More information about the Gpa-dev mailing list