I have a log file, and when I open it via vim, it looks not readable, and it has [converted] at the bottom. What does [converted] mean?
Is there a way to fix the format issue so that it is human readable?
vivim
I have a log file, and when I open it via vim, it looks not readable, and it has [converted] at the bottom. What does [converted] mean?
Is there a way to fix the format issue so that it is human readable?
Best Answer
It means that
vim
detected that the file did not match the charset given by your locale and made a conversion. If you run the command:set
from withinvim
:Notice the last 2 options,
fileencoding
&fileencodings
.The first is the encoding used for the current file, the second is a comma separated list of recognized encodings.
So when you see that message
vim
is telling you that it's completed converting the file fromfileencoding
toencoding
.Check out
:help fileencoding
or:help encoding
for additional details.Reference
I found the thread below, which I used as a source when this was answered. The original site is now gone (accessible in this answer's history), so I'm moving the contents of that thread here for posterity sake. The link was still in the Wayback Machine.