From nobody@FreeBSD.org  Wed Feb 16 14:38:25 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D3BCD106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Feb 2011 14:38:25 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id C48B68FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Feb 2011 14:38:25 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1GEcPZx042603
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Feb 2011 14:38:25 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p1GEcPtA042602;
	Wed, 16 Feb 2011 14:38:25 GMT
	(envelope-from nobody)
Message-Id: <201102161438.p1GEcPtA042602@red.freebsd.org>
Date: Wed, 16 Feb 2011 14:38:25 GMT
From: Dominic Fandrey <kamikaze@bsdforen.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: groff_mdoc UTF-8 issue
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         154822
>Category:       gnu
>Synopsis:       groff_mdoc UTF-8 issue
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    uqs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 16 14:40:09 UTC 2011
>Closed-Date:    Thu Mar 24 17:35:34 UTC 2011
>Last-Modified:  Wed Jun  8 08:10:10 UTC 2011
>Originator:     Dominic Fandrey
>Release:        RELENG_8
>Organization:
private
>Environment:
FreeBSD mobileKamikaze.norad 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #0: Tue Feb  8 15:38:58 CET 2011     root@mobileKamikaze.norad:/usr/obj/HP6510b-8/amd64/usr/src/sys/HP6510b-8  amd64

>Description:
The Aq macro of the doc definition, see groff_mdoc(7), encloses e-mail addresses with angle brackets, like <kamikaze@bsdforen.de>.

With a UTF-8 locale like en_GB.UTF-8, it uses a less wide, em-high set of angle brackets for this.
While technically correct two issues turn this into a problem. Many fonts do not define that character, resulting in broken output in your terminal emulator of choice. The second problem is that e-mail programs do not recognize the character as an angle bracket.

The ASCII compatible <> are understood by e-mail programs, allowing simple copy'n'paste(TM) from manual pages, which is no longer possible when using different angle bracket characters.
>How-To-Repeat:
env LANG=C man geom
env LANG=en_US.UTF-8 geom

Jump to the AUTHORS section.
>Fix:
I propose changing the specification of the Aq macro, not very elegant, but it works.

Patch attached with submission follows:

--- contrib/groff/tmac/doc.tmac.orig	2011-02-16 14:31:28.000000000 +0100
+++ contrib/groff/tmac/doc.tmac	2011-02-16 14:32:15.000000000 +0100
@@ -1197,8 +1197,8 @@
 .  if !\n[doc-arg-limit] \
 .    ds doc-macro-name Aq
 .
-.  ds doc-quote-left \[la]
-.  ds doc-quote-right \[ra]
+.  ds doc-quote-left <
+.  ds doc-quote-right >
 .
 .  doc-enclose-string \$@
 ..


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->uqs 
Responsible-Changed-By: uqs 
Responsible-Changed-When: Sun Feb 20 13:40:55 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154822 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: gnu/154822: commit references a PR
Date: Wed,  2 Mar 2011 21:59:56 +0000 (UTC)

 Author: uqs
 Date: Wed Mar  2 21:59:42 2011
 New Revision: 219209
 URL: http://svn.freebsd.org/changeset/base/219209
 
 Log:
   Unbreak .Aq for non-ASCII output like -Tps or -Tutf8.
   
   groff will try to produce fancy angle brackets like
   	Foo ⟨foo@FreeBSD.org⟩
   This is nice and well, but no email client will understand them. For
   ease of copy&paste keep the one-true pair of brackets 0x3c/0x3e.
   
   See:		RFC 822, RFC 2822
   PR:		gnu/154822
   Submitted by:	Dominic Fandrey <kamikaze@bsdforen.de>
   MFC after:	2 weeks
 
 Modified:
   head/contrib/groff/tmac/doc.tmac
 
 Modified: head/contrib/groff/tmac/doc.tmac
 ==============================================================================
 --- head/contrib/groff/tmac/doc.tmac	Wed Mar  2 21:51:22 2011	(r219208)
 +++ head/contrib/groff/tmac/doc.tmac	Wed Mar  2 21:59:42 2011	(r219209)
 @@ -1197,8 +1197,8 @@
  .  if !\n[doc-arg-limit] \
  .    ds doc-macro-name Aq
  .
 -.  ds doc-quote-left \[la]
 -.  ds doc-quote-right \[ra]
 +.  ds doc-quote-left <
 +.  ds doc-quote-right >
  .
  .  doc-enclose-string \$@
  ..
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: uqs 
State-Changed-When: Wed Mar 2 22:00:37 UTC 2011 
State-Changed-Why:  
Patched in head, awaiting MFC 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154822 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: gnu/154822: commit references a PR
Date: Thu, 24 Mar 2011 17:09:36 +0000 (UTC)

 Author: uqs
 Date: Thu Mar 24 17:09:24 2011
 New Revision: 219965
 URL: http://svn.freebsd.org/changeset/base/219965
 
 Log:
   MFH r219209: Unbreak .Aq for non-ASCII output like -Tps or -Tutf8.
   
   PR:		gnu/154822
   Submitted by:	Dominic Fandrey <kamikaze@bsdforen.de>
 
 Modified:
   stable/8/contrib/groff/tmac/doc.tmac
 Directory Properties:
   stable/8/contrib/groff/   (props changed)
 
 Modified: stable/8/contrib/groff/tmac/doc.tmac
 ==============================================================================
 --- stable/8/contrib/groff/tmac/doc.tmac	Thu Mar 24 16:56:33 2011	(r219964)
 +++ stable/8/contrib/groff/tmac/doc.tmac	Thu Mar 24 17:09:24 2011	(r219965)
 @@ -1197,8 +1197,8 @@
  .  if !\n[doc-arg-limit] \
  .    ds doc-macro-name Aq
  .
 -.  ds doc-quote-left \[la]
 -.  ds doc-quote-right \[ra]
 +.  ds doc-quote-left <
 +.  ds doc-quote-right >
  .
  .  doc-enclose-string \$@
  ..
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: gnu/154822: commit references a PR
Date: Thu, 24 Mar 2011 17:09:53 +0000 (UTC)

 Author: uqs
 Date: Thu Mar 24 17:09:37 2011
 New Revision: 219966
 URL: http://svn.freebsd.org/changeset/base/219966
 
 Log:
   MFH r219209: Unbreak .Aq for non-ASCII output like -Tps or -Tutf8.
   
   PR:             gnu/154822
   Submitted by:   Dominic Fandrey <kamikaze@bsdforen.de>
 
 Modified:
   stable/7/contrib/groff/tmac/doc.tmac
 Directory Properties:
   stable/7/contrib/groff/   (props changed)
 
 Modified: stable/7/contrib/groff/tmac/doc.tmac
 ==============================================================================
 --- stable/7/contrib/groff/tmac/doc.tmac	Thu Mar 24 17:09:24 2011	(r219965)
 +++ stable/7/contrib/groff/tmac/doc.tmac	Thu Mar 24 17:09:37 2011	(r219966)
 @@ -1197,8 +1197,8 @@
  .  if !\n[doc-arg-limit] \
  .    ds doc-macro-name Aq
  .
 -.  ds doc-quote-left \[la]
 -.  ds doc-quote-right \[ra]
 +.  ds doc-quote-left <
 +.  ds doc-quote-right >
  .
  .  doc-enclose-string \$@
  ..
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: uqs 
State-Changed-When: Thu Mar 24 17:35:21 UTC 2011 
State-Changed-Why:  
Merged to stable branches. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154822 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: gnu/154822: commit references a PR
Date: Wed,  8 Jun 2011 08:08:56 +0000 (UTC)

 Author: ru
 Date: Wed Jun  8 08:08:42 2011
 New Revision: 222852
 URL: http://svn.freebsd.org/changeset/base/222852
 
 Log:
   Pull up all vendor changes to mdoc(7).
   
   This also replaces the local fix in r219209 that made .Ac emit
   ASCII angle quotes with an official fix.  In the official fix,
   ASCII quotes are output when using the .Aq, .Ao and .Ac calls,
   but only when nested into the .An macro.
   
   PR:		gnu/154822
 
 Modified:
   head/contrib/groff/tmac/doc-common
   head/contrib/groff/tmac/doc-syms
   head/contrib/groff/tmac/doc.tmac
   head/gnu/usr.bin/groff/tmac/mdoc.local
 
 Modified: head/contrib/groff/tmac/doc-common
 ==============================================================================
 --- head/contrib/groff/tmac/doc-common	Wed Jun  8 04:57:14 2011	(r222851)
 +++ head/contrib/groff/tmac/doc-common	Wed Jun  8 08:08:42 2011	(r222852)
 @@ -543,6 +543,7 @@
  .ds doc-operating-system-FreeBSD-7.3     7.3
  .ds doc-operating-system-FreeBSD-8.0     8.0
  .ds doc-operating-system-FreeBSD-8.1     8.1
 +.ds doc-operating-system-FreeBSD-8.2     8.2
  .
  .ds doc-operating-system-Darwin-8.0.0  8.0.0
  .ds doc-operating-system-Darwin-8.1.0  8.1.0
 @@ -563,6 +564,17 @@
  .ds doc-operating-system-Darwin-9.4.0  9.4.0
  .ds doc-operating-system-Darwin-9.5.0  9.5.0
  .ds doc-operating-system-Darwin-9.6.0  9.6.0
 +.ds doc-operating-system-Darwin-9.7.0  9.7.0
 +.ds doc-operating-system-Darwin-9.8.0  9.8.0
 +.ds doc-operating-system-Darwin-10.6.0 10.6.0
 +.ds doc-operating-system-Darwin-10.1.0 10.1.0
 +.ds doc-operating-system-Darwin-10.2.0 10.2.0
 +.ds doc-operating-system-Darwin-10.3.0 10.3.0
 +.ds doc-operating-system-Darwin-10.4.0 10.4.0
 +.ds doc-operating-system-Darwin-10.5.0 10.5.0
 +.ds doc-operating-system-Darwin-10.6.0 10.6.0
 +.ds doc-operating-system-Darwin-10.7.0 10.7.0
 +.ds doc-operating-system-Darwin-11.0.0 11.0.0
  .
  .ds doc-operating-system-DragonFly-1.0    1.0
  .ds doc-operating-system-DragonFly-1.1    1.1
 
 Modified: head/contrib/groff/tmac/doc-syms
 ==============================================================================
 --- head/contrib/groff/tmac/doc-syms	Wed Jun  8 04:57:14 2011	(r222851)
 +++ head/contrib/groff/tmac/doc-syms	Wed Jun  8 08:08:42 2011	(r222852)
 @@ -617,6 +617,8 @@
  .\" POSIX Part 1: System API
  .ds doc-str-St--p1003.1        \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1
  .as doc-str-St--p1003.1        " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
 +.ds doc-str-St--p1003.1b       \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1b
 +.as doc-str-St--p1003.1b       " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
  .ds doc-str-St--p1003.1-88     \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-1988
  .as doc-str-St--p1003.1-88     " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq])
  .ds doc-str-St--p1003.1-90     \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9945-1:1990
 @@ -754,6 +756,7 @@
  .
  .ds doc-str-Lb-libarm      ARM Architecture Library (libarm, \-larm)
  .ds doc-str-Lb-libarm32    ARM32 Architecture Library (libarm32, \-larm32)
 +.ds doc-str-Lb-libbsm      Basic Security Module Library (libbsm, \-lbsm)
  .ds doc-str-Lb-libc        Standard C\~Library (libc, \-lc)
  .ds doc-str-Lb-libcdk      Curses Development Kit Library (libcdk, \-lcdk)
  .ds doc-str-Lb-libcompat   Compatibility Library (libcompat, \-lcompat)
 @@ -779,6 +782,7 @@
  .ds doc-str-Lb-libpthread  \*[Px] \*[doc-str-Lb]Threads Library (libpthread, \-lpthread)
  .ds doc-str-Lb-libresolv   DNS Resolver Library (libresolv, \-lresolv)
  .ds doc-str-Lb-librt       \*[Px] \*[doc-str-Lb]Real-time Library (librt, \-lrt)
 +.ds doc-str-Lb-libSystem   System Library (libSystem, \-lSystem)
  .ds doc-str-Lb-libtermcap  Termcap Access Library (libtermcap, \-ltermcap)
  .ds doc-str-Lb-libusbhid   USB Human Interface Devices Library (libusbhid, \-lusbhid)
  .ds doc-str-Lb-libutil     System Utilities Library (libutil, \-lutil)
 
 Modified: head/contrib/groff/tmac/doc.tmac
 ==============================================================================
 --- head/contrib/groff/tmac/doc.tmac	Wed Jun  8 04:57:14 2011	(r222851)
 +++ head/contrib/groff/tmac/doc.tmac	Wed Jun  8 08:08:42 2011	(r222852)
 @@ -1197,8 +1197,14 @@
  .  if !\n[doc-arg-limit] \
  .    ds doc-macro-name Aq
  .
 -.  ds doc-quote-left <
 -.  ds doc-quote-right >
 +.  ie "\*[doc-macro-name]"An" \{\
 +.    ds doc-quote-left <
 +.    ds doc-quote-right >
 +.  \}
 +.  el \{\
 +.    ds doc-quote-left \[la]
 +.    ds doc-quote-right \[ra]
 +.  \}
  .
  .  doc-enclose-string \$@
  ..
 @@ -1527,7 +1533,10 @@
  .  if !\n[doc-arg-limit] \
  .    ds doc-macro-name Ao
  .
 -.  ds doc-quote-left \[la]
 +.  ie "\*[doc-macro-name]"An" \
 +.    ds doc-quote-left <
 +.  el \
 +.    ds doc-quote-left \[la]
  .
  .  doc-enclose-open \$@
  ..
 @@ -1546,7 +1555,10 @@
  .  if !\n[doc-arg-limit] \
  .    ds doc-macro-name Ac
  .
 -.  ds doc-quote-right \[ra]
 +.  ie "\*[doc-macro-name]"An" \
 +.    ds doc-quote-right >
 +.  el \
 +.    ds doc-quote-right \[ra]
  .
  .  doc-enclose-close \$@
  ..
 
 Modified: head/gnu/usr.bin/groff/tmac/mdoc.local
 ==============================================================================
 --- head/gnu/usr.bin/groff/tmac/mdoc.local	Wed Jun  8 04:57:14 2011	(r222851)
 +++ head/gnu/usr.bin/groff/tmac/mdoc.local	Wed Jun  8 08:08:42 2011	(r222852)
 @@ -34,7 +34,6 @@
  .\" FreeBSD .Lb values
  .ds doc-str-Lb-libarchive  Streaming Archive Library (libarchive, \-larchive)
  .ds doc-str-Lb-libbluetooth Bluetooth User Library (libbluetooth, \-lbluetooth)
 -.ds doc-str-Lb-libbsm      Basic Security Module User Library (libbsm, \-lbsm)
  .ds doc-str-Lb-libc_r      Reentrant C\~Library (libc_r, \-lc_r)
  .ds doc-str-Lb-libcalendar Calendar Arithmetic Library (libcalendar, \-lcalendar)
  .ds doc-str-Lb-libcam      Common Access Method User Library (libcam, \-lcam)
 @@ -75,7 +74,6 @@
  .
  .\" FreeBSD releases not found in doc-common
  .ds doc-operating-system-FreeBSD-7.4    7.4
 -.ds doc-operating-system-FreeBSD-8.2    8.2
  .ds doc-operating-system-FreeBSD-9.0    9.0
  .
  .\" Definitions not (yet) in doc-syms
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
