I've downloaded that file in my browser, then tried to open it in Vim,
which does not see it as UTF-8 even though I have 'enc' set to utf-8 and
'fencs' set to ucs-bom,utf-8,latin1
Intrigued, I hit 8g8 which brings me to line 7388 column 11 where the
character � ("micro" prefix, similar to Greek mu, 0xB5) cannot be UTF-8
(bytes in the range 0x80 to 0xBF can only exist in UTF-8 as "trailing
bytes" in a multibyte sequence whose first byte is 0xC0 or higher).
Moving the cursor one position right and repeating gives me only a beep,
so this is AFAICT the only illegal character in the file -- but one
illegal byte in the whole file is enough to reject UTF-8 as the file's
'fileencoding'.
Rereading the file with
:view ++enc=utf-8
reads it as UTF-8 at the cost of an error message about line 7388, where
the � is now replaced by a question mark (but the o-umlaut at line 71
appears as �).
It seems that your file is in UTF-8 at line 71 but in Latin1 at line
7388, which means that it is the file's fault, not Vim's fault, that
such a file cannot be displayed correctly.
See
:help 8g8
:help ++opt
Best regards,
Tony.
--
Never hit a man with glasses. Hit him with a baseball bat.
It looks like you created that file, so you need to fix it
because it is not UTF-8.
Downloading the file with wget and dumping the bytes shows that
the character which I have shown as "?" in the following is not
valid UTF-8:
title="?Torrent 3.0" \
That single byte is hex B5 or binary 10110101. That starts with
"10" which is never valid as the first byte of a character in
UTF-8.
BTW you can find that in Vim by opening the file and typing 8g8
which jumps to the next illegal byte sequence, then typing ga to
show the value.
John
Yeah, that's what I gathered from the other replies.
Thanks!
- Dan