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. Best regards, Tony.