[PLUG] manpage mangling
Paul Heinlein
heinlein at madboa.com
Mon May 19 17:24:15 UTC 2008
On Mon, 19 May 2008, Michael Ewan wrote:
> Paul Mullen wrote:
>> On Sun, May 18, 2008 at 11:54:35AM -0700, Russell Senior wrote:
>>
>>> I noticed a while back that manpages on one of my (debian) desktop
>>> boxes have mangled rendering due to uninterpretted terminal
>>> control codes in an xterm, e.g. (randomly) from the jhead manpage:
>>>
>>
>> Mine does the same thing. It seems to have something to do with
>> character sets and locales. I have $LANG set to "en_US.UTF-8".
>> Setting it to "C" produces readable man pages.
>>
>>
> I have found that most strange text in man pages can be rendered
> properly by doing export LC_ALL=C in your shell. As stated above,
> it's a local problem. As side effect of LC_ALL=C is that ls will
> sort ascii, so case and dot files sort as we're used to.
LC_COLLATE is the variable that determines sort order. I set it to "C"
in all shells to get the traditional ls listings. (LC_ALL is the trump
card of locale variables, overriding LANG and LC_*.)
My assessment is that you'd be better off fixing your UTF-8 display
issues than ignoring them by forcing everything to ASCII.
Does locale(1) show that you have en_US.utf8 stuff installed?
locale -a | grep ^en_US
On Debian systems, /etc/locale.gen determines what locales get built
when libc is updated.
Debian also includes a validlocale(8) utility that can be handy. On
this system, I've got American English Unicode installed, but not
native German (my forebears would be aghast!):
[heinlein at monk ~]$ validlocale en_US.UTF-8
locale 'en_US.UTF-8' valid and available
[heinlein at monk ~]$ validlocale de_DE.UTF-8
locale 'de_DE.UTF-8' not available
de_DE.UTF-8 UTF-8
The very last line -- "de_DE.UTF-8 UTF-8" -- is what I would add to
/etc/locale.gen if I wanted to make German available. Then I'd run
locale-gen(8) to bootstrap the new locale.
--
Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/
More information about the PLUG
mailing list