On 9/06/11 7:08 PM, Karol Samborski wrote:
I have vim 7.3 installed on my fedora and I encountered a problem with
opening files with latin2 encoding. Vim uses utf-8 encoding by deafult
and it's OK for me but sometimes I need to edit file in latin2. I
tried set fileencodings to utf-8,latin2 but it didn't work. I tried
even opening the file with ++enc=latin2 argument but it didn't work
either. The only way I found that it worked was setting encoding to
latin2 but I edit many files in different encodings all the time so
switching the encoding variable isn't a good choice.

It sounds like you are doing everything right.

You are right, setting the encoding option is definitely an unwise move.

A few questions to clarify things and perhaps pinpoint the problem:

What do you see that demonstrates to you that it isn't working?

Having fileencodings=utf-8,latin2 will only fall back to latin2 for text
that is not valid utf-8. Is this the case for your files? Did you set
the option before reading the file (e.g. in vimrc)?

Where did you specify the ++enc=latin2 argument? On the commandline or
with the :e command within Vim?

What do you see after opening the file for

:verbose set fenc?

? Perhaps that will give you a clue how fenc is being set.

Ben.



--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to