Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Extraneous characters at end of man pages [Solved/Explained]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
radio_flyer
Apprentice
Apprentice


Joined: 04 Nov 2004
Posts: 254
Location: Northern California

PostPosted: Thu Nov 08, 2018 9:36 am    Post subject: Extraneous characters at end of man pages [Solved/Explained] Reply with quote

This has been bugging me for some time: whenever I display a man page (eg 'man man') I always see the following characters at the end of the pager output: "(nlu+10". This is true for every manpage I view. It happens when I use a Konsole terminal, and it happens in XFCE terminals.

If I copy or create a manpage in my local directory and display it with '$ man ./localman.1' I see the extraneous characters at the end. Always "(nlu+10".

If I uncompress the compressed man page in the cache (eg /var/cache/man/cat1/man1.xz) with unxz -c I see the same extraneous characters at the end.

If I use 'nroff -mandoc localman.1' I see the output formatted correctly, with no extraneous characters. If I compress the nroff output with xz to a file and then view it with the same pager man uses from /etc/man.conf ("less -isR") there are no extraneous characters. If I decompress the file with unxz there are no extraneous characters.

So it doesn't appear to be a problem with the terminals (all in UTF-8 locale), the compressor/decompressor, or the pager, but with the man program itself while it's piping data around. It looks suspiciously like it has an issue with a newline ('nl' and '10') somewhere. Has anyone else run into this and found a fix?


Last edited by radio_flyer on Fri Nov 09, 2018 5:05 am; edited 1 time in total
Back to top
View user's profile Send private message
mike155
l33t
l33t


Joined: 17 Sep 2010
Posts: 620
Location: Frankfurt, Germany

PostPosted: Thu Nov 08, 2018 11:07 am    Post subject: Reply with quote

Which man package do you use? sys-apps/man-db or sys-apps/man?
Back to top
View user's profile Send private message
radio_flyer
Apprentice
Apprentice


Joined: 04 Nov 2004
Posts: 254
Location: Northern California

PostPosted: Thu Nov 08, 2018 5:29 pm    Post subject: Reply with quote

sys-apps/man. It generally works other than for the extraneous characters.
Back to top
View user's profile Send private message
mike155
l33t
l33t


Joined: 17 Sep 2010
Posts: 620
Location: Frankfurt, Germany

PostPosted: Thu Nov 08, 2018 6:50 pm    Post subject: Reply with quote

Years ago, I also used sys-apps/man. Then I switched my machines to Unicode. From that day, I had troubles with sys-apps/man. I could fix some of the bugs - but others popped up. After a while, I switched to sys-apps/man-db. I've never had problems again.

sys-apps/man seems to be unmaintained. The last release was in 2010, the web site http://primates.ximian.com/~flucifredi/man/ is unreachable (at least today).

The sys-apps/man-db project is regularly publishing new releases. Look at http://www.nongnu.org/man-db/ and http://download.savannah.nongnu.org/releases/man-db/.

My recommendation: switch to sys-apps/man-db.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5291

PostPosted: Fri Nov 09, 2018 12:19 am    Post subject: Reply with quote

I agree with the above post, but the most likely answer to your question: sys-apps/man relies on bashisms in the "echo" command and you have dash as the system shell.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12962

PostPosted: Fri Nov 09, 2018 2:37 am    Post subject: Reply with quote

This is the result of the perfectly wrong fix for sys-apps/man-1.6g uses non-portable `echo \n`. Upstream's code used echo in a non-portable way that would cause a literal \n when used with bash, but a newline when used with dash. Upstream intended for this to produce a literal \n; only dash users received the wrong result. With the fix that Spanky put in, the modified code always produces a newline, so now everyone gets the wrong result, instead of only dash users.

Last edited by Hu on Fri Nov 09, 2018 5:23 am; edited 1 time in total
Back to top
View user's profile Send private message
radio_flyer
Apprentice
Apprentice


Joined: 04 Nov 2004
Posts: 254
Location: Northern California

PostPosted: Fri Nov 09, 2018 5:03 am    Post subject: Reply with quote

Thanks Hu and everyone, that explains what's going on. With a rolling distribution like Gentoo--in my case I'm still using my original 2004 install re-compiled through many hardware upgrades--sometimes obsolescence just sneaks up on you :D

Sounds like it may be time to move on to man-db. I'll mark this solved/explained.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum