Tooltip problem when using UTF-8 and Chinese messages

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Tooltip problem when using UTF-8 and Chinese messages

adah
For simplicity, I tested with the following _vimrc:

language messages zh_CN.UTF-8
set encoding=utf-8
set nocompatible
source $VIMRUNTIME/vimrc_example.vim

After adding setlocale(LC_CTYPE, "C") below setlocale(LC_ALL, "") in
main.c, Vim will start successfully with localized menus and messages and
support for UTF-8. However, the tooltips are messed. It looks like UTF-8
strings output to a CP936 terminal.

Is this remediable within _vimrc, or is a fix to the source needed?

Best regards,

Yongwei
Reply | Threaded
Open this post in threaded view
|

Re: Tooltip problem when using UTF-8 and Chinese messages

adah
An obvervation: if I move "set encoding=utf-8" after "source ...", the
tooltips will be correct, but the menus will be messed up.  So I am
wondering it is a bug?

> For simplicity, I tested with the following _vimrc:
>
> language messages zh_CN.UTF-8
> set encoding=utf-8
> set nocompatible
> source $VIMRUNTIME/vimrc_example.vim
>
> After adding setlocale(LC_CTYPE, "C") below setlocale(LC_ALL, "") in
> main.c, Vim will start successfully with localized menus and messages
> and support for UTF-8. However, the tooltips are messed. It looks like
> UTF-8 strings output to a CP936 terminal.
>
> Is this remediable within _vimrc, or is a fix to the source needed?
>
> Best regards,
>
> Yongwei