Date: Tue, 10 Feb 2009 19:10:48 +0300 (MSK) From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: misc/131562: [man/groff] don't corrupt man pages by replacing all `-' symbols with unicode 0x2212 Message-ID: <20090210161048.1525D108838@hades.panopticon> Resent-Message-ID: <200902101620.n1AGK1FF078598@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090210161048.1525D108838>