From owner-freebsd-current@FreeBSD.ORG Sun Apr 19 04:38:54 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 490F4106564A for ; Sun, 19 Apr 2009 04:38:54 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by mx1.freebsd.org (Postfix) with ESMTP id 22B918FC16 for ; Sun, 19 Apr 2009 04:38:54 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so1219521wfg.7 for ; Sat, 18 Apr 2009 21:38:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=/GT5/3L+z/iOD60cT3HZI21NhKijqKs6nY07yo6k288=; b=PVMPkbGhTJKzKoyMFCM2um9TEWgK4eMvDtfI0s0W+9YnuZyyP68t+F3heO02WupV4P mngOqgS5eNqNkUe2d0Dyo8MNXgStIzjmQzYJVPRk83MPF/hmPdk8BvZiMxF0lMaRcUtO aHrnodmv2BcWrDMaUJpgK3dY2bbfgBPNKJHSY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=UuaCdFCKNYy7CIl55pbXEUpmWGiODukk4+zrk4XiP+wNV6ZdXEPgYtzAra4J5oP1vb j/Kn+iS5hxduB3BNTfW/d+6wyMy7tMxsYiQMx5qyZaCRvmGVRkoYkK7V4Fz5/UN46MoI m7un+ZnPb186WBNS9H4S/T6OReA120KprDWOI= MIME-Version: 1.0 Received: by 10.142.140.6 with SMTP id n6mr3938758wfd.70.1240114325817; Sat, 18 Apr 2009 21:12:05 -0700 (PDT) Date: Sun, 19 Apr 2009 12:12:05 +0800 Message-ID: <1d6d20bc0904182112o793f6299x52504ed63dcc4237@mail.gmail.com> From: Jia-Shiun Li To: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: man pages, groff, and utf8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2009 04:38:54 -0000 This is about the formatting in man pages. I set LC_ALL to zh_TW.UTF8 in .cshrc. recently I found there seems some strangeness in man pages. After a close look I found that the dashes(minus signs) preceding options does not look right. utf-8: http://jiashiun.googlepages.com/Screenshot-utf8.png without LC_ALL: http://jiashiun.googlepages.com/Screenshot-ascii.png (note the dashes) I did not know exactly what groff does but after some reading I knew it is text formatting tool, with macros. I think it is safe to say that groff expands some macro to locale-dependent punctuations. The problem is, sometimes in the man pages these punctuations are intended for code, keyboard input chars, not for their textual meanings. If users (for example, I did) copy-paste these text, they will not get correct result. Some part of the man page text should have been in ASCII rather than locale-symbols. Here are some ideas: Is it possible to add some macro to embrace these that needs no locale conversion? or maybe a different set of macros for this kind of usage? or special mode for man pages? I did not look into the macro sources, so cannot tell how much man page macros and those for common text relate. A quick workaround is to alias 'man' to 'man -o'. It works well for English man pages, but then user will not be able to read localized ones. Jia-Shiun.