Hi, All.

I gladly appreciate the enthusiastic discussion about ASCII, UTF-8, BOM, etc.
But I still have a question. What is the better way to configure VIM to
recognize some kind of file encodings? Counting that I use Latin1 one on day
bases but, sometimes, I need to work with UTF-8 or UTF-16le.

This question has a reason: I almost always work with files in Latin1. But,
some times, I need to open files in UTF-8, often XML ones. The problem I found
happens when I am working in GVim with two or more files. I can open the UTF-8
file with ':e ++enc=utf-8' but, when I switch to another buffer that is in
Latin1 and come back to this one, VIM shows it as Latin1.  Since the UTF-8
file has only "ASCII" characters VIM cannot found the correct encoding and
thus uses the default. Off course I can use ':set enc=utf-8' but when you have
to go out and back several times this became too much annoying.

I cannot remember right now but I think I have tested using modelines but it
doesn't worked quite well. If I am not wrong, setting the encoding in a
modeline changes the buffer content and the 'modified' flag becomes 'true'.

There is a better or "easy" way to accomplish the task I mentioned above?

Regards,
Alessandro

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to