"Yongwei Wu" <[EMAIL PROTECTED]> 写于 2006-10-09 14:19:20:
> On 10/9/06, Yongwei Wu <[EMAIL PROTECTED]> wrote:
> > Hi Gurus,
> >
> > I have found another issue with Chinese and UTF-8 combined. When I
> > select 新宋体 (probably called NSimSun on your non-Simplified Chinese
> > Windows box) in gvim with encoding=utf-8, the result of typing `:set
> > guifont?' is:
> >
> >   guifont=<d0><c2><cb><ce><cc><e5>:h12:cGB2312
> >
> > (The `<d0>...<e5' part is in blue colour. D0C2, CBCE, and CCE5 are
> > exactly the GB2312/GBK code points for the three characters 新宋体.)
> >
> > I cannot choose the font by typing `:set guifont=新宋体:h12', so
> > basically I cannot choose it in my _vimrc while using UTF-8.
>
> I was not accurate enough. I was able to choose this font by:
>
>   exec 'set guifont=' . iconv('新宋体', 'utf-8', 'cp936') . ':h12'
>
> But I do not think it is a nice way.
>
> Best regards,
>
> Yongwei
> --
> Wu Yongwei
> URL: http://wyw.dcweb.cn/


Hi, it seems that Windows require the fontname to be encoded as cp936, or
if the '新宋体' is encoded in cp936? Well, whatever you do in Vim, Vim
should ask windows for the fontname '新宋体' with cp936 encoding. But what
should Vim do then? add a 'fontnameencoding' option?

I'd remembered that you have some articles in IBM archive, which said the
'termencoding' should be the encoding of the operating system. Okay, then
should Vim be changed to use 'termencoding' as the fontname encoding? I
doubt it.

Every font has a pure-latin name, it may be safer to use the latin name of
the font, (average users may not know how to get the latin name of the font
though).

--
Sincerely, Pan, Shi Zhu. ext: 2606

Reply via email to