Mailing List Archive

Link against ncursesw
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.

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
sensible?


[1] https://bugzilla.redhat.com/show_bug.cgi?id=704495

--
Stanislav Ochotnicky <sochotnicky@redhat.com>
Software Engineer - Base Operating Systems Brno

PGP: 7B087241
Red Hat Inc. http://cz.redhat.com
Re: Link against ncursesw [ In reply to ]
Hi,

Stanislav Ochotnicky <sochotnicky@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.
Re: Link against ncursesw [ In reply to ]
On Wed, 10 Aug 2011 05:59, ueno@unixuser.org said:

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

Applied.


Salam-Shalom,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gpa-dev mailing list
Gpa-dev@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gpa-dev
Re: Link against ncursesw [ In reply to ]
On Fri, 22 Jul 2011 14:30, sochotnicky@redhat.com said:

> 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

Do we still need this pacth after Ueno's patch?


BTW, please send pinentry related stuff in the future to gnupg-devel.
gpa--dev is only for GPA which is just one application using GnuPG.


Shalom-Salam,

Werner


--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gpa-dev mailing list
Gpa-dev@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gpa-dev