From: Anton Zinoviev <anton@lml.bas.bg>
Subject: Re: "Outer world" encoding for non-Latin1 language environments
Date: Wed, 13 Mar 2002 22:13:13 +0200 [thread overview]
Message-ID: <20020313221313.A5280@lml.bas.bg> (raw)
In-Reply-To: <Pine.SUN.3.91.1020307080104.8027G-100000@is>; from eliz@is.elta.co.il on Thu, Mar 07, 2002 at 08:02:09AM +0200
[-- Attachment #1: Type: text/plain, Size: 1635 bytes --]
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
[-- Attachment #2: emacs-isokeys.patch --]
[-- Type: text/plain, Size: 1001 bytes --]
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))
[-- Attachment #3: emacs-paste --]
[-- Type: text/plain, Size: 513 bytes --]
character: ^[$B'U^[(B (0151725, 54229, 0xd3d5)
charset: japanese-jisx0208 (JISX0208.1983/1990 Japanese Kanji: ISO-IR-87.)
code point: 39 85
syntax: word
category: Y:Cyrillic characters of 2-byte character sets j:Japanese
|:While filling, we can break a line at this character.
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 ^[$B'Q'c'U'f^[(B
next prev parent reply other threads:[~2002-03-13 20:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-27 11:29 "Outer world" encoding for non-Latin1 language environments Anton Zinoviev
2002-02-27 11:10 ` Eli Zaretskii
2002-03-01 18:00 ` Anton Zinoviev
2002-03-01 18:23 ` Stefan Monnier
2002-03-01 19:57 ` Eli Zaretskii
2002-03-05 10:57 ` Anton Zinoviev
2002-03-05 17:28 ` Eli Zaretskii
2002-03-06 18:27 ` Anton Zinoviev
2002-03-06 19:22 ` Eli Zaretskii
2002-03-06 20:16 ` Anton Zinoviev
2002-03-07 6:02 ` Eli Zaretskii
2002-03-13 20:13 ` Anton Zinoviev [this message]
2002-03-15 7:09 ` Eli Zaretskii
2002-03-22 12:25 ` Eli Zaretskii
2002-03-01 1:28 ` Stefan Monnier
2002-03-01 7:36 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2002-02-27 11:46 Kenichi Handa
2002-02-27 12:11 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020313221313.A5280@lml.bas.bg \
--to=anton@lml.bas.bg \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).