From owner-svn-src-all@freebsd.org Mon Jul 2 08:36:44 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 33B66FEA962; Mon, 2 Jul 2018 08:36:44 +0000 (UTC) (envelope-from daichigoto@icloud.com) Received: from mr22p34im-asmtp002.me.com (mr22p34im-asmtp002.me.com [17.111.211.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C53177B063; Mon, 2 Jul 2018 08:36:43 +0000 (UTC) (envelope-from daichigoto@icloud.com) Received: from process-dkim-sign-daemon.mr22p34im-asmtp002.me.com by mr22p34im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0PB800200D3WEI00@mr22p34im-asmtp002.me.com>; Mon, 02 Jul 2018 08:36:42 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=04042017; t=1530520602; bh=39koAgMzcxcVwpuGiM9RfKeQJhgK9wuWnjy+cXTqOxg=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=ZYCEw4TaQqDNL1b5hy/cOjPedcmwrcljK/lD3+M0IRxQ+k9mfmNjzUArFZ/WrqvA2 avnRo1U6d9uXNwj3TkZKLNl1avbO+6nQ7O+ZWtZMQKHHRFiUVyrQj1+s1bvGqny/NY BcYCSxcmq9efsz7+JmSILi6G33gpXGH1kPDD2533J0TyN4XS6NK1+/aAraM05TT4im /0VOxJ2FxGOsg1TJaAeaCgTS0IvyEX0fQtWI0JEuKv5wENKhr1R7QZSW+YMa0LbKou Tg9gk9fJ/aEuvEwlRlhwOlZNsNNfvtopVb65m6G2TCjAV9Ditu/weacIA94rDMKaMN fNo6ROcD19XTA== Received: from icloud.com ([127.0.0.1]) by mr22p34im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0PB800IVID90Z120@mr22p34im-asmtp002.me.com>; Mon, 02 Jul 2018 08:36:42 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-07-02_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1807020101 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: svn commit: r335836 - head/usr.bin/top From: =?utf-8?B?5b6M6Jek5aSn5Zyw?= In-reply-to: <20180702.155529.1102410939281120947.hrs@allbsd.org> Date: Mon, 02 Jul 2018 17:36:36 +0900 Cc: lists@eitanadler.com, daichi@freebsd.org, gnn@FreeBSD.org, cem@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-transfer-encoding: quoted-printable Message-id: <459BD898-8072-426E-A968-96C1382AC616@icloud.com> References: <201807010532.w615W44e042172@repo.freebsd.org> <20180702.155529.1102410939281120947.hrs@allbsd.org> To: Hiroki Sato X-Mailer: Apple Mail (2.3445.6.18) 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 08:36:44 -0000 > 2018/07/02 15:55=E3=80=81Hiroki Sato =E3=81=AE=E3=83=A1= =E3=83=BC=E3=83=AB: >=20 > Eitan Adler wrote > in = : >=20 > 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. >=20 > 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. >=20 > -- 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=