Bug 70733

Summary: question marks instead of hyphens
Product: [Retired] Red Hat Linux Reporter: Kris Urquhart <kurquhart>
Component: manAssignee: Eido Inoue <havill>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: jjc, redhat
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-07 19:52:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kris Urquhart 2002-08-04 16:03:19 UTC
Description of Problem:
When viewing a man page, I see a question mark wherever man has hyphenated a
word, instead of a hyphen.

Version-Release number of selected component (if applicable):
man-1.5j-9

How Reproducible:
Very

Steps to Reproduce:
1. man man (for example) 
2. scroll down to where a word is hyphenated
3. 

Actual Results:
question mark displayed

Expected Results:
hyphen displayed

Additional Information:
stock limbo2 install

Comment 1 Kris Urquhart 2002-08-23 17:28:11 UTC
This is no longer a problem since I installed null.

Comment 2 Frank Tobin 2002-12-21 06:44:53 UTC
Probably a dup of Bug 75089

Comment 3 Need Real Name 2003-01-07 17:38:52 UTC
This is NOT a duplicate of Bug 75089. (But 80030 and 80931 are.) That bug was 
complaining about xterm not displaying correctly. They are related, but 75089 
addressed the wrong component. The problem is in man, not in xterm. Xterm is 
actually displaying what man is giving it.

The problem is that man (actually the nroff macro) is outputting an incorrect 
character. As mentioned in Bug 75089 comment #8, the nroff macros should be 
outputting 0x2d (HYPHEN-MINUS), not 0x2212 (MINUS SIGN). Why? Because that's 
what the user types when he is entering the character on the command line, and 
what he enters to search the man pages. Outputting 0x2d would allow users to 
keep the UTF-8 encoding, which (as Havoc points out in 80936) is the proper 
thing to do.


Comment 4 Josh Cogliati 2003-01-07 19:07:01 UTC
As mentioned in comment #3 groff generates 0x2212 (MINUS SIGN) instead of 
0x2d (HYPHEN-MINUS).  This comes from the file usr/share/groff/1.18/font/devutf8/R
which has the following definition (similar for B,BI, and I files):
\-      24      0       0x2212
which is used in the man definition for ls(1) option -l:
\fB\-l\fR
use a long listing format

This will generate:
       \u2212l     use a long listing format
rather than the prefered (that could be searched for):
       \u002dl     use a long listing format

Since large numbers of man pages use \- to denote - for parameters 
(including groff itself), \- should be mapped to 0x002D rather than
0x2212.  

This can be fixed by changing:
\-      24      0       0x2212
to 
\-      24      0       0x002D
in the files B,BI,I, and R in /usr/share/groff/1.18/font/devutf8 directory.


Comment 5 Josh Cogliati 2003-01-07 19:29:32 UTC
I think this is fixed in rawhide with Bug 79102 ?

Comment 6 Eido Inoue 2003-01-07 19:52:19 UTC
confirmed. U+2212 is changed back to plain ascii minus in rawhide. Will go in
next release/errata.