Hi Tony :) * A.J.Mechelynck <[EMAIL PROTECTED]> dixit: > DervishD wrote: > >>>If I change 'enc', I see 'á', correctly. > >>You should do ":edit ++enc=utf-8 filename" or include "utf-8" in > >>'fileencodings' before editing the file. Then it will work no matter > >>what 'encoding' is set to. > > > > But then my US-ASCII files (and new files) will be considered utf-8, > >and I don't want that. Or do you mean that if I set (e.g.) > >'fencs=ucs-bom,latin1,utf8' things will work even if utf8 is never tried > >because latin1 always succeeds? > > In ":set fencs=ucs-bom,latin1,utf8", UTF-8 is indeed never tried because > Latin1 always succeeds. And that means *never*. IOW, that setting is > logically equivalent to just ":set fencs=ucs-bom,latin1". There is > _nothing_ that Vim will do in one case and not in the other.
So, and if I understand everything correctly, if my locale is latin1, my terminal is latin1 (that is, enc=latin1 and tenc=latin1) and I want to edit/view utf8 files *and* I don't want new files or US-ASCII files to be considered utf8, my best bet is to use "BufReadPre" to detect utf8 files using "file -i" or something similar, thus forcing the conversion, am I wrong? I assume that when "BufReadPos" is invoked, any conversion has already been carried, am I wrong? Well, all of the above is easy to test, so if I can afford the time later, I'll do and post here my results. Thanks, Tony :) 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!