On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hello,

Recently I want to do some research about 'fileencodings', what I want is
to recognize utf-8, ucs-2le, euc-cn and cp936 encodings.

So I set the 'fencs' in my .vimrc:
set fencs=ucs-bom,utf-8,ucs-2le,euc-cn,cp936

However, cp936 files are always recognized as ucs-2le and I got everything
in a mess...
If I remove the ucs-2le:
set fencs=ucs-bom,utf-8,euc-cn,cp936

That would work, but ucs-2le files cannot get recognized at all.

It is said that unicode files all have BOM, and obviously cp936 files do
not have BOM, so I wonder why cp936 files get recognized as ucs-2le file
without any BOM.

It's not recommended using UCS-2 without BOM. It's not an easy thing
to detect its file encoding automatically. Maybe you need a fenc
detecting plugin, such as "FencView". Although the current version of
FencView cannot handle your problem, I think it will be able to do
this after some modifications. Please contact Ming Bai
<[EMAIL PROTECTED]> and tell him your problem.

I tried to change my 'encoding' setting, but it doesn't affect anything.

Any hints?
--
Sincerely, Pan, Shi Zhu. ext: 2606



Regards,

Edward L. Fox

Reply via email to