On 9/15/05, Kenichi Handa wrote: > In article <87psrb9xhj.fsf@pacem.orebokech.com>, Romain Francoise writes: > > > I received a bug report from a Chinese user complaining that Emacs 22 > > wants to use a Japanese font to display a character from the Chinese > > alphabet, even if the language environment is set to something Chinese > > (in this case, Chinese-GB). > > > My guess is that the character is identical in Chinese and Japanese > > (kanji) alphabets and that Emacs just uses the "best fitting" font, > > which isn't installed on this user's workstation. Apparently, > > (list-charset-chars 'chinese-gb2312) correctly shows the character, but > > the font isn't selected when displaying a regular buffer. > > > Is that a bug or a configuration problem? I'm not really knowledgeable > > about this stuff, can someone enlighten me? > > > You can find more information here: > > > > > I've just read that thread. In any Chinese-XXX lang. env., > if that character is (0x4A4A of GB2312) encoded in UTF-8, > Emacs correctly decodes it into chinese-gb charset. So, my > question is how he got that character in Emacs buffer. One > possibility is that he cut&pasted it from the other > application and that application sent that character encoded > in compound-text while designating JISX0212. In that case, > Emacs surely decodes it into japanese-jisx0212, but that is > a correct behaviour. > > (setq x-select-request-type '(UTF8_STRING COMPOUND-TEXT)) > > forces Emacs to ask the other application to send a > selection data in utf-8 if possible. So, this setting will > work for him. > I am very glad to reproduce this bug to you: my env: locale: LANG=en_US.UTF-8 emacs-snapshot: emacs-snapshot-gtk in debian version 1:20050908-1 i use 'emacs-snapshot -q' to start emacs, open a new file, input "ΚΚ", save it, use 'C-u C-x =' to get the char info, this is the result: character: ΚΚ (0270313, 94411, 0x170cb, U+9002) charset: [japanese-jisx0212] (JISX0212 Japanese supplement: ISO-IR-159.) code point: [97 75] syntax: w which means: word category: C:Chinese (Han) characters of 2-byte character sets j:Japanese |:While filling, we can break a line at this character. buffer code: 0x94 0xE1 0xCB file code: 0xE9 0x80 0x82 (encoded by coding system mule-utf-8) display: by this font (glyph code) -Misc-Fixed-Medium-R-Normal--16-150-75-75-C-160-JISX0212.1990-0 (0x614B) if i use 'emacs-snapshot -q -no-site-file' to open emacs, and open the file contain that char(it seems i can't input that char with a clean emacs), I got the same result. Thanks -- LI Daobing