From owner-svn-src-all@freebsd.org Mon Jul 2 06:56:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7C54FDB1EA; Mon, 2 Jul 2018 06:56:46 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (mx-int.allbsd.org [IPv6:2001:2f0:104:e002::7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gatekeeper.allbsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43E0176469; Mon, 2 Jul 2018 06:56:46 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail-d.allbsd.org ([IPv6:2409:11:a740:c00:58:65ff:fe00:b0b]) (authenticated bits=56) by mail.allbsd.org (8.15.2/8.15.2) with ESMTPSA id w626uMJA029334 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) (Client CN "/OU=GT07882699/OU=See+20www.rapidssl.com/resources/cps+20+28c+2915/OU=Domain+20Control+20Validated+20-+20RapidSSL+28R+29/CN=*.allbsd.org", Issuer "/C=US/O=GeoTrust+20Inc./CN=RapidSSL+20SHA256+20CA+20-+20G3"); Mon, 2 Jul 2018 15:56:34 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from alph.d.allbsd.org ([IPv6:2409:11:a740:c00:16:ceff:fe34:2700]) by mail-d.allbsd.org (8.15.2/8.15.2) with ESMTPS id w626uHP6031168 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Jul 2018 15:56:17 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:0:0:0:0:0:0:0:1]) (authenticated bits=0) by alph.d.allbsd.org (8.15.2/8.15.2) with ESMTPA id w626uFMM031165; Mon, 2 Jul 2018 15:56:17 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Mon, 02 Jul 2018 15:55:29 +0900 (JST) Message-Id: <20180702.155529.1102410939281120947.hrs@allbsd.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 From: Hiroki Sato In-Reply-To: References: <201807010532.w615W44e042172@repo.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Mon_Jul__2_15_55_29_2018_512)--" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.allbsd.org [IPv6:2001:2f0:104:e001:0:0:0:41]); Mon, 02 Jul 2018 06:56:34 +0000 (UTC) X-Spam-Status: No, score=-94.9 required=13.0 tests=CONTENT_TYPE_PRESENT, QENCPTR1,RCVD_IN_AHBL,RCVD_IN_AHBL_PROXY,RCVD_IN_AHBL_SPAM,RDNS_NONE, SPF_SOFTFAIL,URIBL_SC2_SURBL,URIBL_XS_SURBL,USER_IN_WHITELIST autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mx.allbsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2018 06:56:47 -0000 ----Security_Multipart(Mon_Jul__2_15_55_29_2018_512)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Eitan Adler wrote in : li> On 1 July 2018 at 10:08, Conrad Meyer 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)----