Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Jul 2018 15:55:29 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        lists@eitanadler.com, daichi@freebsd.org, gnn@FreeBSD.org
Cc:        cem@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r335836 - head/usr.bin/top
Message-ID:  <20180702.155529.1102410939281120947.hrs@allbsd.org>
In-Reply-To: <CAF6rxg=Zjkf6EbSgt1fBQBUDHGKWwLf=n9ZJweJH%2BDi800kJ3w@mail.gmail.com>
References:  <201807010532.w615W44e042172@repo.freebsd.org> <CAG6CVpXvic6y6VLEjBzxFtdQC=6b_%2BC2CmEvpMssgYEahAZhOQ@mail.gmail.com> <CAF6rxg=Zjkf6EbSgt1fBQBUDHGKWwLf=n9ZJweJH%2BDi800kJ3w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Mon_Jul__2_15_55_29_2018_512)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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

li> On 1 July 2018 at 10:08, Conrad Meyer <cem@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

----Security_Multipart(Mon_Jul__2_15_55_29_2018_512)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iEYEABECAAYFAls5zGEACgkQTyzT2CeTzy3ahACgmEoFqKTMw8dNmwXpvxmVe6wU
floAniQbYbMXyE9yAEB2qkOAA8Dfwje6
=33jb
-----END PGP SIGNATURE-----

----Security_Multipart(Mon_Jul__2_15_55_29_2018_512)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180702.155529.1102410939281120947.hrs>