Sometimes I download files in cp1251, cp866, and koi8r encodings, all of which are used to represent Cyrillic characters.
How should I specify them in set fileencodings=...
so that when I open such a file in Vim, it will detect the encoding correctly?
For example, I tried:
setglobal fileencoding=utf-8
set encoding=utf-8
set fileencodings=utf8,cp1251,cp866,ucs-2le,koi8r
It doesn't really work. Here is the text used for text files and the results of each test:
Съешь ещё этих мягких французских булок, да выпей же чаю.
file in cp1251 - encoding is detected correctly
file in cp866 - encoding is detected as cp1251
file in koi8r - encoding is detected as cp1251