Yakov Lerner wrote:
I prepared the file with russian characters in utf8, the russian alphabet:
# russian alphabet in utf-8
абвгдеёжзиклмнопрстуфхцчшщэюя
АБВГДЕЁЖЗИКЛМНОПРСТУФХЦЧШЩЭЮЯ
I set the 'konsole' encoding to utf8.
When I 'cat' this file, I see russian alphabet, so I assume it's
correct utf8 file.
Now when I vim this file, and 'enc' and 'fenc' are both set to utf8, but
vim shows blabks, no russian letters. How do I fix it ?
Thanks
Yakov
I see the Russian alphabet (lowercase then uppercase) with yo but without
short i, hard sign, ery and soft sign.
Use gvim and set a proper 'guifont' with Cyrillic glyphs (I recommend Courier
New if installed).
'encoding' and 'fileencodings' (plural) should both be set before you read the
file.
If you affix a BOM (codepoint U+FEFF) at the start of the file, many program
(including Vim when 'fencs' includes "ucs-bom") will recognise it more easily.
The BOM is represented by different byte sequences for each Unicode encoding:
UTF-32be: 00 00 FE FF
UTF-32le: FF FE 00 00
UTF-16be: FE FF
UTF-16le: FF FE
UTF-8: EF BB BF
It corresponds to the 'bomb' option in Vim.
Best regards,
Tony.