Yongwei Wu wrote:
Hi Tony,

On 2/28/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
>> It would be possible to make a special case for GB18030 in set_init_1().
>> This would set 'encoding' to "utf-8" and 'termencoding' to "GB18030".
>> Perhaps you can try these settings and check if everything works:
>> translated menus, input methods, using Vim in a terminal (if a GB18030
>> terminal exists), etc.
>
> It is a viable solution, but it is complicated. I have no access to a
> GB18030 terminal currently, but I can speculate that in order to
> achieve the "no surprise" principle, you will have to change
> fileencoding and fileencodings too so that people can open a
> GB18030/GBK file without setting any Vim options.

IIUC, 'fileencodings' will (if its behavious isn't changed) be set to
"ucs-bom,utf-8,default" where "default" means, in this case, GB18030.

Probably you are right. I have no idea how the "default" value is
deduced at the present moment.

IIUC (from reading :help 'fencs') it is the OS default -- I guess this would be $LC_CTYPE as set when starting (g)vim.


The default for 'fileencoding' will remain empty (meaning UTF-8
now); anyone not happy with this can ":setglobal fenc=GB18030" in
the vimrc. If he doesn't and gets surprised, let him come here and
I'll explain: wo bu shi zhongguoren but I've made Vim encodings one
of my hobbies.

You are always friendly :-). However, this will be a surprise, since
the behaviour will be different than when locale is zh_CN.GBK.
Surprises in software are generally bad.

Best regards,

Yongwei


Hm, yes, but sometimes they can't be avoided.


Best regards,
Tony.
--
Ankh if you love Isis.

Reply via email to