Bug 240553 - misc/pinfo: presents Unicode symbols as garbage
Summary: misc/pinfo: presents Unicode symbols as garbage
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Baptiste Daroussin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-13 08:43 UTC by Victor Sudakov
Modified: 2019-09-17 05:09 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Sudakov 2019-09-13 08:43:12 UTC
misc/pinfo presents Unicode symbols as garbage even on UTF-8 terminals with ru_RU.UTF-8 locale.

How to reproduce. Find an info file with Unicode Characters (e.g. U+2018 and U+2019), there are many such files. For example libidn2.info has numerous "LEFT SINGLE QUOTATION MARK" and "LEFT SINGLE QUOTATION MARK" glyphs. View them with pinfo and see that those multibyte characters are presented as garbage:

M-b~@~T ~@~X
Comment 1 Victor Sudakov 2019-09-13 08:48:48 UTC
print/texinfo seems to just skip (ignore) the non-ascii characters in the same documents. I don't know which is worse.
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-09-13 09:19:29 UTC
A commit references this bug:

Author: bapt
Date: Fri Sep 13 09:19:02 UTC 2019
New revision: 511918
URL: https://svnweb.freebsd.org/changeset/ports/511918

Log:
  Ensure the port is linked to libncursesw to properly support wildchar.
  While here make it use USES=ncurses to be able to properly choose between
  base ncurses and the port version

  PR:		240553
  Reported by:	Victor Sudakov <vas@mpeks.tomsk.su>

Changes:
  head/misc/pinfo/Makefile
  head/misc/pinfo/files/
  head/misc/pinfo/files/patch-macros_curses.m4
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-09-13 09:41:32 UTC
A commit references this bug:

Author: bapt
Date: Fri Sep 13 09:40:43 UTC 2019
New revision: 511920
URL: https://svnweb.freebsd.org/changeset/ports/511920

Log:
  Fix texinfo playing with unicode variables
  Chose ncurses (tinfo in this case) with widechar support first.

  PR:		240553
  Submitted by:	Victor Sudakov <vas@mpeks.tomsk.su>

Changes:
  head/print/texinfo/Makefile
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2019-09-13 09:42:22 UTC
Can you try both changes I have made? with locales set to fr_FR.UTF-8 I can properly read unicode characters with both pinfo and info commands (after my patches)
Comment 5 Victor Sudakov 2019-09-13 13:21:25 UTC
(In reply to Baptiste Daroussin from comment #4)
> Can you try both changes I have made? 

Both misc/pinfo and print/texinfo are fine now, at least in the ru_RU.UTF-8 locale. Thank you!!
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2019-09-17 05:09:53 UTC
^Triage: Assign to committer that resolved