From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Description of problem:
I selected en_US as default when installed it. When I change character
coding by selecting "Terminal -> Character Coding" to either "Chinese
Simplified (GB10830)" or "Chinese Simplified (GB2312)", and use "vi"
to edit a GB text, there are Chinese characters displayed, but none of
them is correct. You will know instantly even if you cannot read and
understand Chinese. Similar error occurs for "Chinese Traditional
(BIG5)" and BIG5 text.
In RedHat 9.0, I can select language to Simplified Chinese before
login and display Chinese correctly, after I select the correct
character coding. But with Fedora Core 1, even this method does not work.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. install Fedora core 1 with en_US locale
2. open gnome terminal
3. set "Terminal -> Character Coding" to "Simplified Chinese
(GB10830)" or "Simplified Chinese (GB2312)"
4. edit a GB text file using "vi"
Actual Results: The GB text is displayed incorrectly. There are
Chinese characters displayed on the screen, but they are not what the
text actually is.
Expected Results: GB text should be displayed correctly.
With a gnome terminal, when proper Character Coding is selected, text
files with that coding should be displayed correctly, regardless of
the locale setting. Otherwise why allow people to select other
Yidao Cai, can you see if you still have this problem with FC2
I did not test FC2, and I probably will not have time to test it
before it is released. The test procedure published on web site only
uses gEdit for testing, not gnome terminal or other applications. I
think that has to be changed.
as long as you use the command like cat, which outputs the characters
to the character device directly, it should works regardless of the
locale setting, yes. but gnome-terminal will decides the initial
encoding from the current locale when it's run. and almost
applications needs the correct locale setting to take care of their
native languages. as you mentioned in the first comment, you may be
missing the proper locale to work the applications for Chinese.
So please make sure whether it works or not, when the locale is set
BTW the reason allow to change the encoding is people wants to change
the encoding without restarting the terminal.
"cat" works fine as you suggested, but "vi" does not, whether I select
language as English or Chinese before login.
I think I have installed everything that's needed. If I were right,
the language selection process before login sets the local to either
English or Chinese.
BTW, everything works fine in RedHat 9.0, and I did not do anything
different with FC1.
Well, you say even if you choose Simplified Chinese on gdm, and login
then, vi doesn't work with Simplified Chinese on gnome-terminal by
If you mean vi on gnome-terminal doesn't show GB2312 and/or GB18030
text, please read RELEASE-NOTES. we did migrate the locale and the
encoding to UTF-8 since FC1, and you are running UTF-8 locale now. so
what you expect here may be:
$ LANG=zh_CN.GB18030 gnome-terminal --disable-factory
(on realized gnome-terminal)
$ export LANG=zh_CN.GB18030
$ vi foo
it should works. and this isn't a bug then, because vi and
gnome-terminal refers the current locale, and the current locale isn't
zh_CN.GB18030 and zh_CN.GB2312 either, which you expected.
Yes, the above works fine. Thanks.
To summarize, regardless you select the language as Simplified Chinese
before you login, you have to do these two steps to display GB2312 or
GB18030 Chinese characters with vi:
1. $ export LANG=GB18030 (or GB2312)
2. choose "Terminal" --> "Character Coding" --> "GB2312" or "GB18030".
If you do not select Simplified Chinese before login, you can only
view/delete Chinese characters in vi but not be able to input Chinese
characters. If you select Simplified Chinese before login, then you
will have a full functional Chinese environment.
I did not test for Traditional Chinese but I think it will be similar.
I can understand that UTF is the way to go, but in the meantime, GB or
Big5 is not going away in a short time. So I have these suggestions:
1. option to select locale on gdm, to change locale for all applications.
2. on gnome-terminal, add option to change locale, or always using the
matching local for the Character Coding chosen.
At the minimal, easy-to-find information on this subject should be
Hmm, actually the languages selection on gdm is to change the locale.
I assume you mean something like "Simplified Chinese (GB18030)" should
be added, right? then it won't be fixed since we have decided to
migrate CJK locale to UTF-8 on FC1 and later.
BTW IIIMF works on even UTF-8 locale to input the native languages.
LANG=zh_CN.GB18030 gnome-terminal --disable-factory should be fine. We
may thinking of writing a FAQ or some sort for dealing with this type
of native encoding vs UTF-8 issue. Thanks!