[Bug 617761] Re: GVIM2 menu doesn't display Chinese character
Eric Miao
eric.miao at canonical.com
Tue Apr 17 09:08:57 UTC 2012
@An Yang, then apparently we need to change the title to something
different. gvim _can_ display GB18030, the problem is really it has
moved to use utf-8 internally, and guessing the encoding before read it
in according to the list of fileencodings.
:set fileencodings
And you will see the list of default fileencodings being "ucs-
bom,utf-8,default,latin1". Now I believe default is the charset of the
current locale (most likely being 'UTF-8'), so vim will fall back to
latin1 as the last resort, and trying to convert the gb18030 encoded
characters internally to utf-8, treating them as latin1 encoded, which
is obviously wrong. And once converted to utf-8, setting different
encoding by 'set encoding=' won't work as the content of the buffer is
already wrong.
One way to work around this,
:set fileencodings=gb18030,ucs-bom,utf-8,default,latin1
This will give vim a chance to convert from gb18030 firstly, and it
works for me.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to vim in Ubuntu.
https://bugs.launchpad.net/bugs/617761
Title:
GVIM2 menu doesn't display Chinese character
Status in “vim” package in Ubuntu:
Confirmed
Bug description:
Binary package hint: vim
I'm using Ubuntu 10.04 x64, GVIM2 menu is strange and no Chinese character is displayed.
I've installed Chinese language support in advance.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: vim-gnome 2:7.2.330-1ubuntu3
ProcVersionSignature: Ubuntu 2.6.32-24.39-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Sat Aug 14 16:56:00 2010
ExecutablePath: /usr/bin/vim.gnome
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
LANGUAGE=zh_CN:zh
PATH=(custom, user)
LANG=zh_CN.utf8
SHELL=/bin/bash
SourcePackage: vim
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/vim/+bug/617761/+subscriptions
More information about the foundations-bugs
mailing list