[Bug 203098] [PATCH] misc/lifelines: improve wide character (UTF-8) support

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Sep 14 13:11:41 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203098

            Bug ID: 203098
           Summary: [PATCH] misc/lifelines: improve wide character (UTF-8)
                    support
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: david at catwhisker.org
                CC: dhw at FreeBSD.org, matt at gsicomp.on.ca
                CC: matt at gsicomp.on.ca
             Flags: maintainer-feedback?(matt at gsicomp.on.ca)
          Keywords: patch

Created attachment 161039
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=161039&action=edit
patch to misc/lifelines src/stdlib/icvt.c to improve wide character support

I had been using misc/lifelines for years; up until a few weeks ago, I had no
perceived need for wide character support, so I had LANG set to en_US.ISO8859-1
and LC_ALL set to C -- and things were generally working.  In particular, I had
no issues with misc/lifelines.

A few weeks ago, I became convinced that certain aspects of my life (unrelated
to misc/lifelines) would become significantly easier if I were to switch to
UTF-8, which I did.  And once I got through the initial "turbulence," things
seemed OK.

About a week later, I had occasion to use misc/lifelines for the first time
since switching to UTF-8... and I found that every surname was now rendered as
"?" -- which is a bit worse than merely annoying.

I whined about this on the lifelines list (LINES-L at LISTSERV.NODAK.EDU),
received a couple  of suggestions (essentially, switch the environment back to
non-UTF-8) which did not work for me (quite possibly because I also now have
the xterm*utf8 resource set to 1), so I spent a bit of quality time with gdb
(the results of which I posted to the above-cited list).

In that post, I cited some things that looked a bit odd in the code; a couple
of the responses zeroed in on a section of src/stdlib/icvt.c.

Accordingly, I hacked at the code a bit, fired up gmake, and ... the resulting
executable actually seems to work properly now.

It's a one-line patch that essentially makes the one line more in keeping with
the pattern of others in that context, rather than looking like a copy/paste
error (as one of my correspondents put it); I've attached it.

For reference, I am using lifelines-3.0.62, running:
FreeBSD g1-252.catwhisker.org 10.2-STABLE FreeBSD 10.2-STABLE #146 
r287776M/287779:1002500: Mon Sep 14 04:17:32 PDT 2015    
root at g1-252.catwhisker.org:/common/S1/obj/usr/src/sys/CANARY  amd64
(today).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list