Hi Tony :) * A.J.Mechelynck <[EMAIL PROTECTED]> dixit: > >>Your problem lies in the relation between UTF-8, Latin1 and US-ASCII. > >>Characters 0x00 to 0x7F are represented identically in all three, > >>therefore if a file contains only 7-bit ASCII characters, it won't make > >>any difference whether it is interpreted as US-ASCII, Latin1 or UTF-8 -- > >>the data will be the same, *represented the same way*, in all three cases. > > > > I know that, ucs-bom and utf-8 are tried before latin1 and utf-8 > >always succeeds for US-ASCII files :((( > > No need to frown: US-ASCII "is" UTF-8 (but the reciprocal is not always > true): or if you prefer, a UTF-8 file containing only codepoints below > U+0080 can be read correctly, with no errors or misreadings, by any program > accepting US-ASCII.
Sorry, I'm afraid I didn't use the proper smiley O:) I wasn't frowning, what I wanted to express was more in the lines of "how unfortunate am I", or something like that. Sorry for the mistake... > > A partial solution for me would be to force "latin1" when saving a > >file, but then I take the risk of messing the encoding of a couple of > >projects where I may add code which are utf-8 :(( > > > > Probably my best bet is to map "save as latin1" and do this > >manually. > > Rather than map ":w ++enc=latin1" I would map ":setlocal fenc=latin1", > because with the latter (but not with the former) all saves of the file > will be in latin1 until you ":quit" the file Nice idea :)) Thanks a lot :)) > > BTW, and regarding your suggestion above, I just forgot to do it > >back when I wrote my vimrc while reading the documentation. I missed the > >prominent note, sorry O:)))) > > As long as your vimrc includes only 7-bit ASCII, there's no problem. But in > the particular case of your vimrc, you could add the following lines at > top, do ":setlocal fenc=latin1", and (IIUC) it will always be _read_ as > Latin1 in the future, because of the accented letters in your name: Won't "scriptencoding" work? I have latin1 characters in my vimrc and setting "encoding=utf8" now causes vim to spill an error when reading it :((( I'm afraid I will have to keep it at the default value. Thanks for all the help :) 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!