vi behaving strange in last time?

hruodr

Well-Known Member

Reaction score: 42
Messages: 333

I have the impression that vi is behaving not normal.

It does not always show new line before EOF, after search not always show the text as is.

Anyone having this ugly experience?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,409
Messages: 29,985

Are you talking about vi(1) (the one in the base) or editors/vim? Technically the latter is vim but can be made to work like vi.
 

PMc

Well-Known Member

Reaction score: 105
Messages: 344

Do You have an international character set that might be a different one than vi thinks it is?
 
OP
OP
H

hruodr

Well-Known Member

Reaction score: 42
Messages: 333

In env I have:

XTERM_LOCALE=en_US.UTF-8
LC_ALL=en_US.UTF-8

but never use vi for something different that ascii. Does it work with utf-8?
 

PMc

Well-Known Member

Reaction score: 105
Messages: 344

Certainly it does work with UTF-8 - if Your files contain valid UTF-8.
But if Your files contain something that is invalid in UTF-8, i.e., most likely some ISO8859-XY characters, then it does not work with vi, and it behaves rather weird and cannot properly page around and lines are mssing.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,409
Messages: 29,985

Don't set LC_ALL, it overrides any and all other LC_* variables. It's not meant to be used as a 'user' setting but as a way to, temporarily, override a user's locale(1) settings.
 
Top