LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   man pages won't display hyphens (https://www.linuxquestions.org/questions/linux-general-1/man-pages-wont-display-hyphens-147280/)

TruckStuff 02-17-2004 03:10 PM

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.

jazernorth 02-17-2004 03:16 PM

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

quatsch 02-17-2004 03:19 PM

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.

TruckStuff 02-17-2004 04:09 PM

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. ;)

TruckStuff 02-18-2004 09:03 AM

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?

jazernorth 02-18-2004 09:28 AM

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

quatsch 02-18-2004 09:52 AM

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.

TruckStuff 02-20-2004 08:02 AM

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. :(

wapcaplet 02-20-2004 09:32 AM

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.

quatsch 02-20-2004 09:51 AM

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 :)?

TruckStuff 02-20-2004 11:04 AM

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. :o


All times are GMT -5. The time now is 03:29 AM.