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

Re: Terminal issues in fresh install



On Tue, Jan 01, 2008 at 12:48:04PM -0600, Dave Sherohman <dave@sherohman.org> was heard to say:
> On Mon, Dec 31, 2007 at 05:19:52PM -0800, Daniel Burrows wrote:
> > On Mon, Dec 31, 2007 at 06:23:52PM -0600, Dave Sherohman <dave@sherohman.org> was heard to say:
> > > Is it significant that the old machine was using the basic en_US locale
> > > or that I've been accessing both of them via ssh from a workstation with
> > > its locale set to C?
> > 
> >   I'd guess that the locale of the workstation is relevant here.  Your
> > terminal is going to be running in your locale (you didn't mention if
> > was the system console or an X terminal, but I assume an X terminal),
> > and so it won't know how to deal with UTF-8 sequences output by the
> > commands you're running remotely.
> > 
> >   Probably your best bet is to either enable UTF-8 locally or disable it
> > remotely.
> 
> Thanks for the suggestion.  Building the en_US.UTF-8 locale on the 
> workstation and exporting LANG=en_US.UTF-8 in the window used to connect  
> to the server (your assumption of an X terminal is accurate) had no 
> discernible effect, but setting LANG=C on the server did get the ASCII 
> graphics working correctly.

  Note that just changing the environment variable inside the terminal
won't help -- it's the terminal that needs to interpret those sequences,
so you have to run *the terminal itself* in the new locale.  I just
ended up setting my locale in ~/.xsession to make it stick:

export LC_ALL=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export LANG=en_US.UTF-8

> The workstation is still running the 
> previous stable version (I haven't talked myself into dealing with 
> working out the configuration for switching from XFree86 to x.org yet),
> so perhaps my X terminals are just too old to be able to handle UTF-8, 
> regardless of the locale.

  IIRC there was a situation a few years ago where you had to install a
Unicode-enabled xterm, pass "-u", or both.  Sarge dates to 2005; I'm sure
that there were X terminals in 2005 that could handle UTF-8, but I don't
know if the default xterm did.

  On the other hand, if you have no need for Unicode, just changing the
remote end to C is probably the simplest option.

  Daniel


Reply to: