Link against ncursesw

Daiki Ueno ueno at unixuser.org
Wed Aug 10 05:59:23 CEST 2011


Hi,

Stanislav Ochotnicky <sochotnicky at redhat.com> writes:

> 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
> OK
> setdesc ąćęłńóśźżĄĆĘŁŃÓŚŹŻ
> OK
> getpin
> [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.

That reminds me of that I wrote a similar patch back in 2009:

http://article.gmane.org/gmane.comp.encryption.gpg.devel/15428

which also addressed an issue that text frames are not rendered
correctly when there is a double-width character on a line.

I'm attaching a revised (and minimized) patch.

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

It would be good to respect lc-ctype option.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-wide-char-support-to-pinentry-curses.patch
Type: text/x-patch
Size: 9908 bytes
Desc: not available
URL: </pipermail/attachments/20110810/3484f842/attachment.bin>
-------------- next part --------------

Regards,
-- 
Daiki Ueno


More information about the Gpa-dev mailing list