From owner-freebsd-bugs@FreeBSD.ORG Tue Feb 10 16:20:01 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB5DE106566B for ; Tue, 10 Feb 2009 16:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A25D68FC1A for ; Tue, 10 Feb 2009 16:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n1AGK1LD078599 for ; Tue, 10 Feb 2009 16:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n1AGK1FF078598; Tue, 10 Feb 2009 16:20:01 GMT (envelope-from gnats) Resent-Date: Tue, 10 Feb 2009 16:20:01 GMT Resent-Message-Id: <200902101620.n1AGK1FF078598@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitry Marakasov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD5731065670 for ; Tue, 10 Feb 2009 16:11:07 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [217.170.79.85]) by mx1.freebsd.org (Postfix) with ESMTP id 76B678FC26 for ; Tue, 10 Feb 2009 16:11:06 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LWvCW-0007Pk-Ft for FreeBSD-gnats-submit@freebsd.org; Tue, 10 Feb 2009 19:11:08 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 5059AABF4 for ; Tue, 10 Feb 2009 19:10:43 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 1525D108838; Tue, 10 Feb 2009 19:10:48 +0300 (MSK) Message-Id: <20090210161048.1525D108838@hades.panopticon> Date: Tue, 10 Feb 2009 19:10:48 +0300 (MSK) From: Dmitry Marakasov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: misc/131562: [man/groff] don't corrupt man pages by replacing all `-' symbols with unicode 0x2212 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dmitry Marakasov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2009 16:20:02 -0000 >Number: 131562 >Category: misc >Synopsis: [man/groff] don't corrupt man pages by replacing all `-' symbols with unicode 0x2212 >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 10 16:20:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Dmitry Marakasov >Release: FreeBSD 8.0-CURRENT i386 >Organization: >Environment: System: FreeBSD hades.panopticon 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Jan 24 06:27:03 UTC 2009 amdmi3@chrysalis.panopticon:/mnt/usr/obj/mnt/usr/src/sys/HADES i386 >Description: While formating man pages, groff does replace all `-' (U+002D HYPHEN-MINUS) with `−' (U+2212 MINUS SIGN). This is never correct as command line argument descriptions, mathematical operator descriptions and other stuff become broken and useless for copypasting and search. The fix attached is a workaround (thanks swell.k at gmail dot com), but that's not enought as there are other cases of symbol corruption. Examples from `man sh`: set -E set ‐E <& >& <<- >| <& >& <<‐ >| backquote (``') backquote (‘‘’) (U+2018 LEFT SINGLE QUOTATION MARK) I guess the correct fix would be to always use -Tascii for man formatting. >How-To-Repeat: man anything with UTF-8 locale >Fix: --- R.proto.patch begins here --- Index: contrib/groff/font/devutf8/R.proto =================================================================== --- contrib/groff/font/devutf8/R.proto (revision 186255) +++ contrib/groff/font/devutf8/R.proto (working copy) @@ -726,7 +726,7 @@ product 24 0 0x220F coproduct 24 0 0x2210 sum 24 0 0x2211 -\- 24 0 0x2212 +\- 24 0 0x002D mi " -+ 24 0 0x2213 ** 24 0 0x2217 --- R.proto.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: