Kiwon Um wrote:
[...]
> But still one more question...
> I've tested something more with Hangul i.e. Korean text.
> I have some 'euckr' encoded text files but my VIMs (such gvim or vim)
> cannot read/show these files correctly.
> Although I set 'encoding=euckr' and 'fileencoding=euckr or utf8', it
> show me some broken characters.
[...]

How to solve that will depend on which kinds of files you usually edit; the 
following assumes that you have 'encoding' set to utf-8:

a) Most files are either Unicode with BOM, UTF-8 (even without BOM), or euc-kr:

        :set fileencodings=ucs-bom,utf-8,euc-kr,latin1

If some euc-kr file is wrongly detected as UTF-8:

        :e ++enc=euc-kr filename

If you need to edit some Unicode file without BOM in another encoding than 
UTF-8, use (for instance):

        :e ++enc=utf-16le filename

b) You have only a few euc-kr files, and you know what they are:

        :set fileencodings=ucs-bom,utf-8,latin1

Always open euc-kr files with

        :e ++enc=euc-kr filename

c) All (or almost all) your Unicode files have a BOM:

        :set fileencodings=ucs-bom,euc-kr,latin1

If you need to edit a Unicode file without a BOM, use for instance

        :e ++enc=utf8 filename

etc.

To set the BOM on all _new_ Unicode files by default, use

        :setglobal bomb

This setting does not affect non-Unicode files. For existing files, the 
presence or absence of a BOM is detected automatically if 'fileencodings' 
starts with "ucs-bom".

See
        :help 'fileencodings'
        :help ++opt
        :help 'bomb'

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

Raspunde prin e-mail lui