Re: Character set conversion (through ssh)
- From: Jellby <me@xxxxxxxxxxx>
- Date: Tue, 26 Dec 2006 21:05:44 +0100
Among other things, Bill Marcum saw fit to write:
"vi" could be an alias or symlink for vim, elvis, nvi or something else.
If you check the man page, there is probably an option to select a
different config file or to set config options on the command line. You
can use that to create an alias or function in .bashrc so vi behaves
differently depending on $LANG.
Thanks, I always forget "vi" is not the real program. I think I have it
working like this:
In the server, in ~/.bashrc I have
if [ -n "$SSH_TTY" ]; then
export LANG=es_ES.ISO-8859-15
export LC_ALL=es_ES.ISO-8859-15
fi
and in ~/.vimrc, these lines:
if match($LANG,'ISO-8859-15') > -1
set encoding=utf-8
set termencoding=iso-8859-15
endif
In this way, when I connect from outside, I have a latin1 environment and
terminal, but vim still assumes utf8 files.
However, I don't think this solution is optimal, because the configuration
should be in the client and not in the server, I might connect from a utf8
client, and then I don't want the .bashrc stuff, but well, it's good enough
for the moment.
--
Ignacio __ Fernández Galván
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com
.
- References:
- Character set conversion (through ssh)
- From: Jellby
- Re: Character set conversion (through ssh)
- From: Bill Marcum
- Character set conversion (through ssh)
- Prev by Date: Re: How do you run xterm without losing your environment variables and aliases?
- Next by Date: Re: How do you run xterm without losing your environment variables and aliases?
- Previous by thread: Re: Character set conversion (through ssh)
- Next by thread: How can I delay after sending each character to a device?
- Index(es):
Relevant Pages
|