From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Anton Zinoviev Newsgroups: gmane.emacs.devel Subject: Re: "Outer world" encoding for non-Latin1 language environments Date: Wed, 13 Mar 2002 22:13:13 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <20020313221313.A5280@lml.bas.bg> References: <20020306221657.A17354@lml.bas.bg> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="LwW0XdcUbUexiWVK" X-Trace: main.gmane.org 1016049989 4670 127.0.0.1 (13 Mar 2002 20:06:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 13 Mar 2002 20:06:29 +0000 (UTC) Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16lF13-0001DE-00 for ; Wed, 13 Mar 2002 21:06:29 +0100 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16lF3o-0000yh-00 for ; Wed, 13 Mar 2002 21:09:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16lF0u-0001uj-00; Wed, 13 Mar 2002 15:06:20 -0500 Original-Received: from lml.bas.bg ([195.96.224.121]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 16lEzQ-0001nC-00 for ; Wed, 13 Mar 2002 15:04:48 -0500 Original-Received: from anton by lml.bas.bg with local (Exim 3.12 #1 (Debian)) id 16lF7Z-0001o3-00 for ; Wed, 13 Mar 2002 22:13:13 +0200 Original-To: emacs-devel@gnu.org Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from eliz@is.elta.co.il on Thu, Mar 07, 2002 at 08:02:09AM +0200 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:1917 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1917 --LwW0XdcUbUexiWVK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 7.III.2002 at 08:02 Eli Zaretskii wrote: > > On Wed, 6 Mar 2002, Anton Zinoviev wrote: > > > I wanted to say that there are no problems in Linux console. The > > problems are only in X Window. This makes me think that the problem is > > not because of the locale-coding-system (I am not able to check this > > right now). > > Actually, this points into the direction I was thinking of: on a text > terminal locale-coding-system is not used to decode keyboard input, while > on X it is. (Sorry for the delayed reply.) I investigated what happened. Emacs tries to get a code for the received xkeysym. It gets this code acording to encoding of the locale Emacs is started with. If this encoding includes the key-pressed symbol the result is an Emacs-event of the form [194], where 194 is the code of the key-pressed symbol. If this symbol is not included in the encoding of the locale, then the result is a symbol of the form [S-Cyrillic-A]. Emacs can't interpret such sort of events (they are not bound to any action) and that's why I got beeps -- I started Emacs under LANG=C and thus Cyrillic symbols were not includes of the locale encoding (i.e. ASCII). This is not a real bug, but only a wishlist. However Emacs beeps also for xkeysyms like ISO_Next_Group, thou it must interpret them the same way as Mode_switch. This is a bug, I've attached the fix. Copying from a KOI8-R of ISO-8859-5 xterm and pasting in Emacs works fine -- the result are symbols from ISO-8859-5. Copying from an Unicode xterm gives Japanese double-width Cyrillic symbols. The output of C-u C-x = is attached. Regards, Anton Zinoviev --LwW0XdcUbUexiWVK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="emacs-isokeys.patch" diff -Naur emacs.old/src/xterm.c emacs.new/src/xterm.c --- emacs.old/src/xterm.c Sat Mar 2 00:38:47 2002 +++ emacs.new/src/xterm.c Sun Mar 10 23:05:22 2002 @@ -1,5 +1,5 @@ /* X Communication module for terminals which understand the X protocol. - Copyright (C) 1989, 93, 94, 95, 96, 1997, 1998, 1999, 2000, 2001 + Copyright (C) 1989, 93, 94, 95, 96, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -10629,6 +10629,14 @@ || ((unsigned)(orig_keysym) == XK_Num_Lock) #endif #endif /* not HAVE_X11R5 */ + /* The symbols from XK_ISO_Lock to + XK_ISO_Last_Group_Lock doesn't have real + modifiers but should be treated similarly + to Mode_switch by Emacs. */ +#if defined XK_ISO_Lock && defined XK_ISO_Last_Group_Lock + || ((unsigned)(orig_keysym) >= XK_ISO_Lock + && (unsigned)(orig_keysym) <= XK_ISO_Last_Group_Lock) +#endif )) { if (temp_index == sizeof temp_buffer / sizeof (short)) --LwW0XdcUbUexiWVK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=emacs-paste Content-Transfer-Encoding: quoted-printable character: =1B$B'U=1B(B (0151725, 54229, 0xd3d5) charset: japanese-jisx0208 (JISX0208.1983/1990 Japanese Kanji: ISO-IR-8= 7.) code point: 39 85 syntax: word category: Y:Cyrillic characters of 2-byte character sets j:Japanese = =20 |:While filling, we can break a line at this character. =20 buffer code: 0x92 0xA7 0xD5 file code: ESC 24 42 27 55 (encoded by coding system iso-2022-7bit) font: -Misc-Fixed-Medium-R-Normal--14-130-75-75-C-140-JISX0208.1983-0 adsf =1B$B'Q'c'U'f=1B(B --LwW0XdcUbUexiWVK-- _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel