LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-17-2004, 03:10 PM   #1
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
man pages won't display hyphens


I've got an annoying little issue that's been bugging me for a while. The problem is that hyphens ("-") on my man pages are replaced with gibberish:
Code:
$ man dmesg
DMESG(8)                                                              DMESG(8)

NAME
       dmesg − print or control the kernel ring buffer

SYNOPSIS
       dmesg [ −c ] [ −n level ] [ −s bufsize ]

DESCRIPTION
       dmesg is used to examine or control the kernel ring buffer.

       The program helps users to print out their bootup messages.  Instead of
       copying the messages by hand, the user need only:
              dmesg > boot.messages
       and mail the boot.messages file to whoever can debug their problem.

OPTIONS
       −c     Clear the ring buffer contents after printing.

       −sbufsize
              Use a buffer of size bufsize to query the  kernel  ring  buffer.
              This  is  16392  by  default.  (The default kernel syslog buffer
              size was 4096 at first, 8192 since 1.3.54, 16384 since 2.1.113.)
              If  you have set the kernel buffer to be larger than the default
              then this option can be used to view the entire buffer.

       −nlevel
              Set the level at which logging of messages is done to  the  con�
              sole.   For  example,  −n  1 prevents all messages, expect panic
              messages, from appearing on the console.  All levels of messages
              are still written to /proc/kmsg, so syslogd(8) can still be used
              to control exactly where kernel messages appear.   When  the  −n
              option  is  used,  dmesg will not print or clear the kernel ring
              buffer.

              When both options are used, only the last option on the  command
              line will have an effect.

SEE ALSO
       syslogd(8)

AUTHOR
       Theodore Ts’o (tytso@athena.mit.edu)
Hyphens are the primary offender, but as you can see from the authtor's name, that's not the only character that doesn't display properly. What gives? This is a Redhat 8.0 box.
 
Old 02-17-2004, 03:16 PM   #2
jazernorth
Member
 
Registered: Jan 2004
Location: Green Bay
Distribution: RedHat 8.0, LFS-5.0
Posts: 100

Rep: Reputation: 15
What are you using to access the linux box? Are you at the consol, in a GUI, or using Telnet/SSH?

I use SSH and it is a font issue with SSH on my remote system. It can be changed, but the other fonts display other characters incorrectly, so I just deal with the bad hyphens.

Enjoy.

JN
 
Old 02-17-2004, 03:19 PM   #3
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
I get it too because I have locale set to something other than en_US. You can probably get around with
env LC_ALL=en_US man <whatever>

if this works, you can set an alias in ~/.bashrc. Add the line
alias man='env LC_ALL=en_US man'
in the appropriate place.
 
Old 02-17-2004, 04:09 PM   #4
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by quatsch
I get it too because I have locale set to something other than en_US. You can probably get around with
env LC_ALL=en_US man <whatever>

if this works, you can set an alias in ~/.bashrc. Add the line
alias man='env LC_ALL=en_US man'
in the appropriate place.
I am running via SSH, but this did the trick! Thanks for the tip. One less nuisance out there.
 
Old 02-18-2004, 09:03 AM   #5
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Original Poster
Rep: Reputation: 30
Hmmm... bizarre side effect of this. It seems now vi won't accept a backspace or a delete character (which makes it very difficult to edit text files). Any ideas what the original "LC_ALL" setting might have been?
 
Old 02-18-2004, 09:28 AM   #6
jazernorth
Member
 
Registered: Jan 2004
Location: Green Bay
Distribution: RedHat 8.0, LFS-5.0
Posts: 100

Rep: Reputation: 15
You could try using mcedit. Most distributions have it on their source cd.

Enjoy.

JN

PS That env=LC_ALL works great. I haven't had one problem yet, and I do most of my Linux Admin via OpenSSH (Putty to be exact).
JN
 
Old 02-18-2004, 09:52 AM   #7
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
if you are using the env command, LC_ALL gets set only temporarily. You can fnd your default settings in either ~/.i18n, or if that does not exist in /etc/sysconfig/i18n.
 
Old 02-20-2004, 08:02 AM   #8
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Original Poster
Rep: Reputation: 30
Well this is just frustrating.... backspace and delete still do not work in VI. Tried all of the following to no avail:
Code:
$ env LC_ALL=en_US vi blah
$ env LC_ALL=en_US:UTF-8 vi blah  (UTF-8 is the default in /etc/sysconfig/i18n btw)
$ env LC_ALL=en_us:en vi blah
$ env LANG=en_US vi blah
$ env LANG=en_US:UTF-8 vi blah
$ env LANG=en_US:en vi blah
Now I wish I had those bizarre characters back on my man pages.
 
Old 02-20-2004, 09:32 AM   #9
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Don't know about the language problems, but for the backspace/delete problem, that is extremely common on *nix Check out this howto for an explanation and how to fix it. One quick-and-dirty fix is to type this as soon as you login:

stty erase (press backspace)

That'll set the backspace code to be used for erasing, as you'd expect. You can also add this to a script that runs when you login... ~/.bashrc or ~/.bash_profile or some such.

Not sure about the delete character, though.

Last edited by wapcaplet; 02-20-2004 at 09:35 AM.
 
Old 02-20-2004, 09:51 AM   #10
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
what if you just use
vi
(no env before). Also, is it not en_US.UTF-8 rather than en_US:UTF-8 (. instead of ?
 
Old 02-20-2004, 11:04 AM   #11
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Original Poster
Rep: Reputation: 30
quatsh-
vi results in the same problem: no backspace and no del

wapcaplet-
Thanks for the link. I was able to atleast get backspace working again. DEL functions the same as backspace which I think means that I need to modify ~/.tcshrc per that HOWTO. Will get to that a little later... I've got to get some work done.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
man pages won't display on Mandrake 10 zahadumy Mandriva 1 11-19-2005 02:10 AM
man pages don't display zahadumy Linux - General 4 05-22-2005 03:44 PM
man pages wont display lowpro2k3 Slackware 6 01-14-2005 04:21 AM
bad font display in man pages (rh8.0) moorege Linux - Software 1 09-14-2003 04:47 AM
man pages don't display linowes Linux - General 2 12-24-2002 09:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration