I do not understand why VIM is there encodingas well fileencoding.
As far as I know, the file is like an array of bytes. When we create a text file, we create an array of characters (or characters) and encode this character array encoded with X into an array of bytes and save the byte array to disk. When reading in a text editor, it decodes an X-encoded byte array to restore the original character array and displays each character with a graph in accordance with the font. Only one encoding is involved in this process .
In VIM, set utf-8 encoding and file encoding , which tells the VIM wiki about working with unicode ,
encodes a set , as vim should represent characters inside . UTF-8 is required for most versions of Unicode.
fileencoding sets the encoding for a specific file (locally for the buffer)
" As vim should represent characters inside " against the " coding for a particular file " ... rewrites Unicode vs UTF-8? If so, why should the user worry about the first?
Any clues?
source
share