help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] How to make man display ascii only on rxvt


From: Greg Wooledge
Subject: Re: [Help-bash] How to make man display ascii only on rxvt
Date: Fri, 29 Jul 2016 13:54:43 -0400
User-agent: Mutt/1.4.2.3i

On Thu, Jul 28, 2016 at 11:47:32PM -0400, address@hidden wrote:
> On Fri, 22 Jul 2016 07:59:57 <address@hidden> wrote:
> > What is your current locale?  (Post the output of "locale".)
> LANG=en_US.utf8
> LC_CTYPE="en_US.utf8"
> LC_NUMERIC="en_US.utf8"
> LC_TIME="en_US.utf8"
> LC_COLLATE="C"
> LC_MONETARY="en_US.utf8"
> LC_MESSAGES="en_US.utf8"
> LC_PAPER="en_US.utf8"
> LC_NAME="en_US.utf8"
> LC_ADDRESS="en_US.utf8"
> LC_TELEPHONE="en_US.utf8"
> LC_MEASUREMENT="en_US.utf8"
> LC_IDENTIFICATION="en_US.utf8"
> LC_ALL=
> 
> I acutally purposefully set it this way since everything is going utf8
> and I got sick of having all these strange chars onscreen.
> It's also recommended in the Gentoo handbook (my system is Gentoo).

You're requesting the utf8 encoding.  Which is fine and appropriate on
current Linux-based systems.

> > Which rxvt are you using?  If your locale is using a utf8 encoding, then
> > you should probably be using rxvt-unicode (a.k.a. urxvt).  The
> > traditional rxvt is suitable for single-byte encodings like iso88591.
> Shouldn't a terminal program check the terminal type? It's set to rxvt
> and rxvt does not use utf8.

No.  The terminal type ($TERM) has no direct impact on the character
encoding ($LANG et al.).

Since you are requesting the utf8 encoding in your locale, you must use
a terminal that can handle utf8 characters.  Contrariwise, if you are
using a terminal that can only handle iso88591 characters, you should
use an iso88591 encoding.

> It will, but I wanted to make it so that man would work with non-utf
> aware terminals, namely: my ttys.

By "my ttys" do you mean the Linux console?  The Linux console in Debian
8 definitely supports UTF-8 characters.  I don't really understand the
internals of this, nor do I know how Gentoo's kernel may differ.

> I need a better setting, though. lynx (which I love), often displays
> chars that come out as garbage on my ttys in spite of my locale setting.

You must match the locale encoding to the TERMINAL's capabilties.  You
might be able to GUESS these from the $TERM variable on a specific set
of systems (e.g. all the systems to which you ever log in), but it is
not a simple problem in the general case.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]