# vi behaving strange in last time?



## hruodr (May 22, 2019)

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 (May 22, 2019)

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.


----------



## hruodr (May 22, 2019)

Of course (n)vi.


----------



## PMc (May 22, 2019)

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


----------



## hruodr (May 23, 2019)

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 (May 23, 2019)

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 (May 24, 2019)

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.


----------

