svn commit: r335836 - head/usr.bin/top

Hiroki Sato hrs at FreeBSD.org
Mon Jul 2 06:56:47 UTC 2018


Eitan Adler <lists at eitanadler.com> wrote
  in <CAF6rxg=Zjkf6EbSgt1fBQBUDHGKWwLf=n9ZJweJH+Di800kJ3w at mail.gmail.com>:

li> On 1 July 2018 at 10:08, Conrad Meyer <cem at freebsd.org> wrote:
li> > Hi Daichi,
li> >
li> >
li> >
li> > I don't think code to decode UTF-8 belongs in top(1).  I don't know
li> > what the goal of this routine is, but I doubt this is the right way to
li> > accomplish it.
li>
li> For the record, I agree. This is why I didn't click "accept" on the
li> revision. I don't fully oppose leaving it in top(1) for now as we work
li> out the API, but long term its the wrong place.
li>
li> https://reviews.freebsd.org/D16058 is the review.

 I strongly object this kind of encoding-specific routine.  Please
 back out it.  The problem is that top(1) does not support multibyte
 encoding in functions for printing, and using C99 wide/multibyte
 character manipulation API such as iswprint(3) is the way to solve
 it.  Doing getenv("LANG") and assuming an encoding based on it is a
 very bad practice to internationalize software.

-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20180702/2cd63437/attachment.sig>


More information about the svn-src-head mailing list