Hi Tony :)
* A.J.Mechelynck <[EMAIL PROTECTED]> dixit:
> >>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.
>
> 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
I've done that and more:
if system("file -bi " . expand("<amatch>")) =~# "; charset=utf-8$"
I was too lazy to ellaborate the regex correctly. It is still
unellaborated, but works better.
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!