Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44201 - some man pages -- e.g. bash -- truncated if man.conf uses -Tlatin1
Summary: some man pages -- e.g. bash -- truncated if man.conf uses -Tlatin1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 146315
  Show dependency tree
 
Reported: 2004-03-09 18:36 UTC by Chris Smith
Modified: 2006-09-04 15:11 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Smith 2004-03-09 18:36:21 UTC
Several man pages -- the only one I wrote down is bash -- are truncated at
a line ending with colon.  I.e.

  $ man bash
   ...
  COMMAND EXECUTION ENVIRONMENT
       The shell has an execution environment, which consists of  the  follow-
       ing:
  $ // ^%@#!!

The problem goes away if you change -Tlatin1 to -Tascii in /etc/man.conf.


Reproducible: Always
Steps to Reproduce:
1. see above
2.
3.

Actual Results:  
See above


Expected Results:  
"man bash" should produce 4512 lines ending with

GNU Bash-2.05b			 2002 July 15			       BASH(1)


Happens with two different x86 installations starting with
stage1-x86-20030910.tar.bz2.  One athlon-xp aggressive opts, one
pentium2 conservative opts.
Comment 1 Rick Morra 2004-08-10 08:12:17 UTC
I've had the same problem:  With the default `man.conf', some man pages are truncated when piped through `col -b`.  My problem seems to be that `col -b` truncates its output at any charcter with its high bit set, and the default `man.conf' allows the output of such characters.  (I use `vim -R -' as my manpager, and the input to vim has to be stripped of backspaces.)

With the default `man.conf', look at the output of `/usr/bin/man -P less bash`.
In the section `COMMAND EXECUTION ENVIRONMENT', there is a bulleted list.  The bullets are displayed as `<B7>' in reverse video.  This is the character `\0xB7', and less displays characters this way when the high bit is set.  If you pipe the `man` output through `col -b`, the output is truncated at this point.  Try `/usr/bin/man -P "col -b | less" bash`, you'll see the truncated output.

Other characters and charater sequences found in the man files are also translated into characters with the high bit set.  For example in `/usr/share/man/man1/sendmail.1.gz' supplied by the `postfix' ebuild, in the description of the option `-i', the word "don't" is found in the file as "don\'t".  This two-byte sequence, "\'", is translated to `0xB4'.  `col -b` truncates the manpage at this point.

As suggested by the comments in `man.conf', I removed the option `-Tlatin1' from the definition of NROFF.  Now all is well.  Instead of getting `0xB4' for the bullets in the bash manpage, I get the letter `o'.  The apostrophe appears correctly in the sendmail manpage, and `col -b' doesn't truncate its output.
Comment 2 SpanKY gentoo-dev 2004-10-03 02:55:12 UTC
i too am seeing the <B7> junk ...

but when i remove the '-Tlatin1' from my man.conf, it still shows up :(

root@vapier 0 ~ # grep ^NROFF /etc/man.conf
NROFF           /usr/bin/nroff -c -mandoc
Comment 3 SpanKY gentoo-dev 2005-01-07 18:11:44 UTC
ok, man-1.5o_p2 fixes the <B7> crap ... turns out i couldnt get it to work on my box because my man was reading the cached version :)

thanks guys for the heavy research !
Comment 4 Matthias Schwarzott gentoo-dev 2006-08-17 02:23:48 UTC
All comments in here seem to prove that just removing the "-Tlatin1" solves the original problem.
Why on earth then it was replaced with -Tascii as that breaks viewing of man-pages on utf8-systems. For example it criples german umlaut (
Comment 5 Matthias Schwarzott gentoo-dev 2006-08-17 02:23:48 UTC
All comments in here seem to prove that just removing the "-Tlatin1" solves the original problem.
Why on earth then it was replaced with -Tascii as that breaks viewing of man-pages on utf8-systems. For example it criples german umlaut (äöü and ß).

I suggest removing -T... completely and let /usr/bin/nroff use its autodetection.
Comment 6 Luca Barbato gentoo-dev 2006-08-17 02:33:19 UTC
col -p works w/out -Tascii ?
Comment 7 SpanKY gentoo-dev 2006-08-19 23:53:46 UTC
considering neither groff nor man supports UTF8 properly, this will be handled properly in due time

both upstream projects are aware of the issues and working on them