Man pages appear corrupted but aren't

Asked by Thinboy00 on 2010-06-16

Some man pages are appearing corrupt (i.e. if I type man foo at the terminal, I get a bunch of caret escaped characters and a few ascii characters). It looks as if man is reading the compressed data in /usr/share/man instead of uncompressing it first. I will soon attach a screenshot of the problem. The really confusing part, though, is that some man pages consistently appear corrupt and the others consistently appear correctly. I've tried the following, to no avail:
mandb
mandb -t
mandb -c
catman
And yes, I did remember to use sudo on those. mandb -t said "whatis parse for /usr/share/man/[etc]:whatis parse for foo(x) failed" about some pages, but not every broken page (most of them appeared to be related to perl, but not all of them). Since whatis is working correctly, I find it hard to believe that's the problem. I also tried this:
zcat /usr/man/man6/nethack.6.gz | less
and it gave unformatted but readable output, even though man nethack doesn't work. I tried the same trick with slashem, which does work correctly for man, and the zcat trick worked too. I'm surprised their man pages behave differently since the pages themselves are practically identical.
Is my copy of man broken?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu man-db Edit question
Assignee:
No assignee Edit question
Last query:
2010-06-16
Last reply:
2010-08-17
Thinboy00 (thinboy00) said : #1

I couldn't find an attach option, so I uploaded the images to ImageShack:
http://img257.imageshack.us/i/screenshot4c.png/
http://img59.imageshack.us/i/screenshot6o.png/

Sam_ (and-sam) said : #2

Just wondering...
What happens when you change font and size?
How about subpixel smoothing in: system preferences -> appearance?
Does the issue remain with a different user account?

Launchpad Janitor (janitor) said : #3

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.

Congratulations, you have found a bug! :)

Recently, the man-db package (which contains man and catman, amongst others) was modified to make sure the output was converted to the universal UTF-8 character format. What seems to happen is that gzip-compressed data is converted to UTF-8, which doesn't make any sense. I tested with two versions of the man-db package, 2.5.6-2 from karmic, and 2.5.7-3 from maverick. I can only reproduce the problem with the maverick version.

You can use the following command that is similar to what happens in man to see the mess it makes:

echo "Hello, world" | gzip -c7 | iconv -c -f ANSI_X3.4-1968 -t UTF-8//TRANSLIT | less

Colin Watson (cjwatson) said : #5

Thanks to Philippe for correctly escalating this as a bug report, namely bug 615045.

I've uploaded man-db 2.5.7-4 to Maverick, correcting this. I have not yet uploaded a fix to Lucid, although this probably ought to happen at some point. You may need to remove the broken cache files from under /var/cache/man/cat*/ by hand.

Can you help with this problem?

Provide an answer of your own, or ask Thinboy00 for more information if necessary.

To post a message you must log in.