[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Man pages are going crazy



On Friday 10 June 2005 20:55, you wrote:
> On Fri, 10 Jun 2005, Benedek Frank wrote:
> > Thanks for that. That Alias thing sounds good, but unfortunately I have
> > no idea where to start. Can you go into that a little further? I dont
> > have the knowledge to set that up, what you just advised to me.
>
> well, personally I'd make a small shell script:
>
> type "locale" <- this will show you a bunch of variables.
>
> in your shell script, unset all of these:
>
> #!/bin/sh
>
> unset LC_CTYPE
> unset LC_COLLATE
>
> and so forth.
>
> then make sure LANG and LANGUAGE are set to C
>
> export LANG=C
> export LANGUAGE=C
>
> then call the actual command:
>
> /usr/bin/man "$@"
>
> You probably don't need to set all of them, but ime you don't want to let
> man ever get the slightest hint of any language or locale settings:
> even a locale of en is likely to reult iin broken man pages as it tries to
> be "clever" and use funky emdash characters.
>
> HTH

Thanks. It worked. I made a script called mannew that looks like this

#!/bin/sh

unset LANG=ja_JP
unset LC_CTYPE="ja_JP"
unset LC_NUMERIC=C
unset LC_TIME=C
unset LC_COLLATE=ja_JP
unset LC_MONETARY="ja_JP"
unset LC_MESSAGES=C
unset LC_PAPER="ja_JP"
unset LC_NAME="ja_JP"
unset LC_ADDRESS="ja_JP"
unset LC_TELEPHONE="ja_JP"
unset LC_MEASUREMENT="ja_JP"
unset LC_IDENTIFICATION="ja_JP"

export LANG=C
export LANGUAGE=C

/usr/bin/man "$@"


Now when I call for example

mannew man

It will display the correct man page. Faboulous. Thanks a lot.

Bence



Reply to: