Re: Special characters in x-term
Re: Special characters in x-term
- Subject: Re: Special characters in x-term
- From: Itai Seggev <email@hidden>
- Date: Thu, 6 Jul 2006 17:46:41 -0700
On Mon, Jun 19, 2006 at 09:01:27PM -0400, John Rothschild wrote:
> >
> >Hello:
> >
> >I am using an x-term on my MacBook to connect to a linux box (Fedora
> >4) machine. Often the linux machine will produce some output that
> >has special characters in it which do not display under my current
> >configuration. Two examples follow:
> >
Man has its own special issues relating to how nroff encodes the
pages. My solution is to define the following function in my .zshrc
(.bashrc) which works for Bourne-style shells.
man () {
export LC_ALL=C
command man $*
export LC_ALL=
}
Alternatively, you could give switches to man and/or nroff (I think -E)
so that it encodes its output in the locale you are using. Do a "man
man" or "man nroff" for the details...
> >
> >2) gcc attempts to produce
> >gre.c: In function `foo?
> >
> >but it comes out as:
> >
> >gre.c: In function ?:
> >
> >Does anyone know if there is a configuration change in OS X to make
> >these characters printable in x-term?
> >
> >Thanks,
> >
> >Brad
>
> I too have had this problem, not only from MacOS, but from Solaris
> and other operating systems as well. It has something to do with the
> locale environment variables, but I have searched long and hard on
> the Internet and Usenet and haven't found an answer. If you set the
> TERM environment variable to xterm-r6, you might get rid of some of
> the characters, but it won't fix everything. If anyone has an
> answer, please let me know. It has been an outstanding issue at
> work, and I would love to see it resolved. Thanks.
I can't guarrentee this will fix everything, but I can provide some
advice that will help:
1) Make sure that UTF-8 is set as your LC_CTYPE at login. For a
Bourne-stype shell this means putting
export LANG=he_IL.UTF-8
in your .profile (or .zshenv for zsh) for a Bourne-style shell, and
setenv LANG he_IL.UTF-8
for c-style shells. Replace he_IL with your correct locale, unless
you really want to read error messages in Hebrew. :) Log out and
log back in after making this changes, otherwise your X executable
won't receive the benifit of these changes. If you're using Solaris
or some other multiuser OS, you'll need ask your sysadmin if X is
running in a UTF-8 environment. Most modern linuces (Debian/Ubuntu,
Fedora Core) use UTF-8 by default, although your sysadmin may have
change this, of course.
2) Make sure that
SendEnv LANG LC_*
appears in your /etc/ssh_config. This way both the local and remote
shells will be using the same locale.
3) Certain operating systems (Solaris, last I checked) do not include
the unicode locales by default for some ungodly reason. If you get
"cannot set locale" messages, this is the problem. Probably setting
your environment variables to C will cuase the least amount of
trouble. You might also try 8859-1.
I have been mercifully free of this problem for a while, but it
certainly took some doing. Good luck!
--
Itai Seggev
Visiting Assistant Professor Office: Lewis 121A
Department of Physics and Astronomy Phone: +1-662-915-3887
University of Mississippi Fax: +1-662-915-5045
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden