Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: gpa

Link against ncursesw

 

 

GnuPG gpa RSS feed   Index | Next | Previous | View Threaded


sochotnicky at redhat

Jul 22, 2011, 5:30 AM

Post #1 of 4 (1631 views)
Permalink
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 [at] redhat>
Software Engineer - Base Operating Systems Brno

PGP: 7B087241
Red Hat Inc. http://cz.redhat.com
Attachments: 0001-Link-against-ncursesw-and-fix-display-of-wide-charac.patch (1.59 KB)
  signature.asc (0.82 KB)


ueno at unixuser

Aug 9, 2011, 8:59 PM

Post #2 of 4 (1483 views)
Permalink
Re: Link against ncursesw [In reply to]

Hi,

Stanislav Ochotnicky <sochotnicky [at] redhat> 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.
Attachments: 0001-Add-wide-char-support-to-pinentry-curses.patch (9.68 KB)


wk at gnupg

Aug 10, 2011, 6:09 AM

Post #3 of 4 (1478 views)
Permalink
Re: Link against ncursesw [In reply to]

On Wed, 10 Aug 2011 05:59, ueno [at] unixuser 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 [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gpa-dev


wk at gnupg

Aug 10, 2011, 6:13 AM

Post #4 of 4 (1481 views)
Permalink
Re: Link against ncursesw [In reply to]

On Fri, 22 Jul 2011 14:30, sochotnicky [at] redhat 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 [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gpa-dev

GnuPG gpa RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.