#752265 xterm: Meta doesn't behave sanely in UTF-8 locales

Package:
xterm
Source:
xterm
Description:
X terminal emulator
Submitter:
Samuel Bronson
Date:
2014-06-21 22:06:08 UTC
Severity:
wishlist
#752265#5
Date:
2014-06-21 21:32:52 UTC
From:
To:
Dear Maintainer,

When I run xterm, whether as `xterm' or as `uxterm', with a UTF-8 locale
(I've tried "en_US.UTF-8" and "C.UTF-8"), my Meta keys (which say Alt on
the cap, and according to xev(1) are Alt_L and Alt_R, which are both
listed under mod1 in xmodmap(1)'s output) are giving some strange
results.

Here are a few choice samples:

M-x: ø
M-q: ñ
M-w: ÷

Experimenting further seems to indicate that Meta is just XORing the
codepoint of the character produced by each key with 0x80.  Now, you and
I both know that I can fix this by toggling the "Meta Sends Escape"
("metaSendsEscape") setting (though this is *not* what I had imagined
would happen with that off in UTF-8 mode), but I don't see why I should
have to do that when the alternative is so ... useless.

And now I see that there are also such settings as "eightBitInput",
"eightBitMeta", and even "altIsNotMeta"/"altSendsEscape" ...

Anyway, it sure seems like the default(s) here could use some work ...
The current situation certainly doesn't make for pleasant Emacsing.

(No, I don't really expect you to pore over my xkbmap, I'm just
attaching it in case it contains some vital piece of info not found
elsewhere in my report.)