Summary: | man pages with unicode give unexpected behavior with dashes | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ta2002 <throw_away_2002> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hiyuh.root, radek, releng, truedfx |
Priority: | High | ||
Version: | 2005.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 146315 | ||
Attachments: |
groff-man-UTF-8.diff-modified
groff-man-UTF-8.diff-second-try |
Description
ta2002
2006-02-03 21:38:15 UTC
Could you please verify that what you're seeing is the ASCII minus sign, rather than a non-ASCII Unicode symbol which looks exactly the same? One way to find out is by viewing one of these manpages, copying the character with the mouse, and typing echo - | cat -v in a shell, except that instead of typing -, you paste it. I'm guessing you'll see "M-bM-^HM-^R" instead of "-". If this is the case, could you please make sure your /etc/man.conf is the same on all your machines, and if not, if you can reproduce this on other systems by making it the same? Oops. :( It seems like you have it right: $ echo − | cat -v M-bM-^HM-^R And yes, I do have a difference in man.conf (the -Tascii option). I guess that solves the problem. Now I need to figure out if I even want to use utf-8 for man pages (searching on what looks like an ascii "-" seems obvious to me, and I do it all the time to find the description of an option). Why on earth would the openssh people make those non-ascii characters (in the middle of pure ascii text) when a far more obvious (at least to me) alternative exists? > Why on earth would the openssh people make those non-ascii characters
> (in the middle of pure ascii text) when a far more obvious (at least
> to me) alternative exists?
It's not their decision. The manpage contains macros that tell nroff "format '1' as an option", but it doesn't tell nroff how to do that. Other manpages would contain "format '-1' in bold" instead, which is why it happens to work with them, but I actually think openssh is doing the right thing here. (If you want to be sure, you can check `gzip -dc /usr/share/man/man1/scp.1.gz`, and look for the .Fl macros. Its meaning is described in the groff_mdoc manpage.) I do think this may be a groff bug though, since −1 isn't a valid scp option, only -1 is. base-system, as responsible for groff, added to CC for additional input. Does this description sound about right, and if so, should groff maybe be changed to force ASCII - for command-line options?
Does this error still exists? Can you please tell us what versions of "man" and "groff" you have installed. (In reply to comment #4) > Does this error still exists? No. My (very recent - as in two minutes ago :) ) update of man from 1.6-r1 to 1.6d appears to have fixed the problem. (In reply to comment #5) > (In reply to comment #4) > > Does this error still exists? > > No. My (very recent - as in two minutes ago :) ) update of man from 1.6-r1 to > 1.6d appears to have fixed the problem. > 1. Please also give us your version of groff. 2. With which man-page did you check the error? For me on x86 it produces the error with "man scp" with man-1.6d and all available versions of groff (1.18.1.1, 1.19.1-r2 and 1.19.2-r1). Still broken here (x86 and amd64): sys-apps/man-1.6d, sys-apps/groff-1.19.2-r1 This bug can be solved by adding the hack now positioned in /usr/share/groff/site-tmac/man.local also to /usr/share/groff/site-tmac/mdoc.local. See attached (modified) groff-man-UTF-8.diff. Created attachment 96041 [details, diff]
groff-man-UTF-8.diff-modified
Created attachment 96043 [details, diff]
groff-man-UTF-8.diff-second-try
*** Bug 173165 has been marked as a duplicate of this bug. *** I have seen groff and man in FC and Debian Etch are patched for compatibility with UTF8 and autorecoding non-UTF8 mans(in KOI8-R, etc) to UTF. Patches are inside their source packages. For examples: http://mirrors.dotsrc.org/fedora/6/source/SRPMS/man-1.6d-1.1.src.rpm and http://mirrors.dotsrc.org/fedora/6/source/SRPMS/groff-1.18.1.1-11.1.src.rpm. *** Bug 176363 has been marked as a duplicate of this bug. *** *** Bug 191488 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of bug 126361 *** blah, goddamn mess of dupes this bug is about the dash issue with unicode / non-unicode it is not about anything else looks like this was half way fixed (man.local) but the important part (mdoc.local) was left out groff-1.19.2-r2 includes mdoc.local as well http://sources.gentoo.org/sys-apps/groff/files/groff-1.19.2-man-unicode-dashes.patch?rev=1.1 |