DervishD wrote:
    Hi Tony :)

 * A.J.Mechelynck <[EMAIL PROTECTED]> dixit:
DervishD wrote:
[...]
   \ if system("file -i " . expand("<amatch>")) =~ "utf8" |
[...]

On my system, "file -i ~/pub/index.htm" (for a file in UTF-8) answers

/root/pub/index.htm: text/x-c; charset=utf-8

Notice the dash between utf and 8.

    My bad, I typed carelessly. It succeeded on my system because I did
my first test with a file *named* 'utf8'. I've noticed the problem a
moment ago, and it's already fixed.

    Thanks a lot for pointing!.

    Raúl Núñez de Arenas Coronado


Hoho... Then maybe you should use file -bi rather than file -i in order to avoid detecting UTF-8 for:

/home/raul/utf-8_to_latin.txt: text/plain; charset=ISO-8859-1


Best regards,
Tony.

Reply via email to