Re: Character set conversion (through ssh)



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
.



Relevant Pages

  • Re: [BUG] linux-next: Tree for May 19/20/21 - BUG at arch/x86/kernel/io_apic_64.c:353!
    ... Can you include the config when you send these, ... from next report will send across the .config file also. ... for the kernel bug discussed. ... # PCI IDE chipsets support ...
    (Linux-Kernel)
  • [PATCH] make miniconfig (take 2)
    ... Add "make miniconfig", plus documentation, plus the script that creates a ... minimal mini.config from a normal .config file. ... A shell script to automatically create mini.config from a normal .config ...
    (Linux-Kernel)
  • Re: log4net mysteriously stops logging
    ... Since the guy who put the logging in did this, the rest of us just carried it through. ... We call XmlConfigurator.Configure and pass it the FileInfo object that represents the config file. ... With the debugging in log4net enabled, ...
    (microsoft.public.dotnet.general)
  • Re: Upgrading to 7.0 - stupid requirements
    ... >> mods-enabled (symlinks for enabled Apache modules) ... the PHP port/package drops a file with the needed config ... all our virtualhosts in a single config file included into the main ... Until you install that one last port that breaks the config file you ...
    (freebsd-stable)
  • Re: X help, or config file for X on Minix 3.1.2-B3?
    ... Unable to locate/open config file ... by that name anywhere on my Minix system. ... Minix installation ...
    (comp.os.minix)