Red Hat Topics - problems with vi/vim with fedora core 4

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Topics > March 2007 > problems with vi/vim with fedora core 4





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author problems with vi/vim with fedora core 4
Jean-Francois Ortolo

2007-03-03, 1:12 pm


Hi all

I got installed Fedora Core 4 a long time ago, then updated the
kernel recently with 'yum update kernel' from root, all went fine.

I had no problem with the vi editor before the kernel updating,
afterwards however, I was not able to write some no ascii characters,
even with the keys sequence 'Alt <number>' I was accustomed to.

I then udated vi/vim with: 'yum update vi-common', which was
successful and updated vi-extended too. The problem remains.

The need is to edit a php script which translates those special
characters, into ascii character, with plenty of: if($var == "<special
char>") $var = "<ascii char>";

The $TERM env variable is: "linux". Should I change that ?

Which is the proper way I should use to edit spécial characters in
vi/vim ?

Moreover, I got some little problems while alternating Edit mode and
Insert mode, but that's not disturbing too much.

Thank you very much for your help.

Best regards.

Jean Francois Ortolo
Jean-Francois Ortolo

2007-03-03, 1:12 pm

Addendum...

Here are the rpms on my system:

vim-common-6.3.086.fc4
vim-enhanced-6.3.086-0.fc4

Then, uname -a reports:

Linux ortolo.jeanfrancois.free.fr 2.6.17-1.2142 FC4 #1 <date> <hour>
EDT 2006 i686 athlon i386 GNU/Linux

Thank you very much for your help.

Best regards.

Jean Francois Ortolo
Scott Lurndal

2007-03-03, 1:12 pm

Jean-Francois Ortolo <ortolo.jeanfrancois.no_spam@free.fr.invalid> writes:
>
>Hi all
>
> I got installed Fedora Core 4 a long time ago, then updated the
>kernel recently with 'yum update kernel' from root, all went fine.
>
> I had no problem with the vi editor before the kernel updating,
>afterwards however, I was not able to write some no ascii characters,
>even with the keys sequence 'Alt <number>' I was accustomed to.
>
> I then udated vi/vim with: 'yum update vi-common', which was
>successful and updated vi-extended too. The problem remains.
>
> The need is to edit a php script which translates those special
>characters, into ascii character, with plenty of: if($var == "<special
>char>") $var = "<ascii char>";
>
> The $TERM env variable is: "linux". Should I change that ?
>
> Which is the proper way I should use to edit spécial characters in
>vi/vim ?
>
> Moreover, I got some little problems while alternating Edit mode and
>Insert mode, but that's not disturbing too much.
>
> Thank you very much for your help.
>
> Best regards.
>
> Jean Francois Ortolo


Check your LANG environment variable. When in doubt, fall back to LANG=C.

also check the output of "env | grep LC_"

scott
Jean-Francois Ortolo

2007-03-03, 7:12 pm

Scott Lurndal wrote:
>
> Check your LANG environment variable. When in doubt, fall back to LANG=C.
>
> also check the output of "env | grep LC_"
>
> scott


Hi

Tried "fr", "fr_FR", then "fr_FR.UTF-8", then "C" for the $LANG
variable, as shown in the /ets/sysconfig/i18n config file.

Tried LC_ALL="fr" instead of LC_ALL=C as before, and LANG="fr" at the
same time.

For all this, I tried to edit a simple essai.txt empty file with vim,
wrote the é letter ( e acute ), then did a: 'od -c essai.txt'

It appears, that vi only edit in UTF mode, which is not correct for
PHP scripts editing.

I vaguely remember there was an advice about that in the FC5 ( or FC6
) docs.

With gedit editor, the special characters appear fine, but I don't
know the way to edit them. Same with emacs.

May I be allowed, to ask you to give me some indications for an
editor properly designed for this kind of tasks ?

Thank you very much for your help.

Best regards.

Jean Francois Ortolo
Jean-Francois Ortolo

2007-03-03, 7:12 pm

Hi sir

I deleted the addendum I wrote to the /etc/profile config file many
months ago, such that the LC_ALL env variable has no more value.

At the same time, I changed the /etc/sysconfig/i18n config file, with:

LANG="fr_FR"

So the whole system should properly be configured for the french
language, isn't it ? Indeed, the system messages at the char screen, do
then appear in french... But accentutated letters, such as e acute ( é
), don't appear at all on the screen.

At the same time, while editing a text file properly written with
special characters, those special characters don't appear at all on the
screen in vim.

As it's quite the same problem as the system messages one, I suspect
that the $TERM env variable, could be badly configured. The actual value
is: "linux".

I'm accustomed to the system messages problem, as described above,
and I didn't pay attention to it, for I encountered it first just after
the install process.

Might you say to me, where is this problem coming from ?

What is the $TERM variable proper value, in a french environment ?

Many thanks for your help.

Regards.

Jean Francois Ortolo
Jean-Francois Ortolo

2007-03-04, 7:12 am

Hi sir

I removed the little addendum I made to the /etc/profile config file,
e.g. :

LC_ALL="C"
export LC_ALL

Afterwards, I did a: env| grep "LC_" , which reports no value.

So the $LC_LOCALE variable has no value, though I'm in a french
environment.

Should I give any value to this variable, and if so, which value ?

May be:

LC_LOCALE="fr" or
LC_LOCALE="fr_FR"

I definitely give to the $LANG variable, this value: "fr_FR", which
makes all system messages be in french.

I think testing both those values, for inquiry.

Many thanks for your help.

Jean Francois Ortolo
Jean-Francois Ortolo

2007-03-04, 7:12 am

Scott Lurndal wrote:
>
> Check your LANG environment variable. When in doubt, fall back to LANG=C.
>
> also check the output of "env | grep LC_"
>
> scott



Hi sir

I'm in a french environment, so I give this value to the $LANG
variable: "fr_FR". In fact, I don't want the used characters set, be
unicode.

I tried this: env | grep "LC_" , which reports nothing: No LC_
variable has any value.

I know the LC_ variables, should be given values inside the
/etc/sysconfig/i18n config file. The only variable appearing in it, is:
LANG="fr_FR"

The three available values for $LANG are: "fr", "fr_FR", and
"fr_FR.UTF-8" , from the comment line at the end of the file.

I think I should set some LC_ variables, such as: LC_CTYPE,
LC_COLLATE, or LC_LOCALE, but whatever values could be available, being
assumed my environment is frenchy ?

Many thanks for your help.

Jean Ortolo
Jean-Francois Ortolo

2007-03-05, 7:13 pm

Hi

In fact, I returned to utf8, by setting those variables in the
/etc/sysconfig/i18n config file:

LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
CHARSET="8859-1"

...

And, while editing a text file with vim, I tape:

:lang fr_FR.ISO_8859-1

Then, the file is being edited in iso8859-1, not in utf8

The accentuated letters, whose ascii codes are below 256, either
appear all the same, in iso or utf8 mode. That's fine.

Hope this can help.

Jean-Francois Ortolo
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com