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

後藤大地 daichigoto at icloud.com
Mon Jul 2 08:36:44 UTC 2018



> 2018/07/02 15:55、Hiroki Sato <hrs at FreeBSD.org>のメール:
> 
> 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

I respect what you mean.

Once I back out, I will begin implementing it in a different way.
Please advise which function should be used for implementation
(iswprint (3) and what other functions should be used?)

Best regards,
Daichi


More information about the svn-src-all mailing list