* bug#17909: 24.4.50; #'read-char fails with non-ASCII characters on the TTY
@ 2014-07-03 14:52 Aidan Kehoe
2014-07-03 15:42 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: Aidan Kehoe @ 2014-07-03 14:52 UTC (permalink / raw
To: 17909
Hello --
Starting from the shell:
$ cd /Sources/emacs/src
$ ./emacs -nw -Q RET
Then, within *scratch*, I type ƒ or ä, both of which are available on my OS
keyboard layout, and both of which self-insert without problems in the same
GNU Emacs. I then type:
(string (read-char)) <control-j> ä
This gives:
"Ã"
I note that the first octet of the UTF-8 encoding of ä corresponds to
this, as we see with, e.g.:
(decode-coding-string (encode-coding-string "ä" 'utf-8) 'iso-8859-1)
=> "ä"
This bug means, among other things, that I can't name a register ä on
the TTY. The same recipe works correctly when the same binary is started as
a Cocoa app, e.g. with open /Sources/emacs/nextstep/Emacs.app .
Best,
Aidan
In GNU Emacs 24.4.50.1 (i386-apple-darwin10.8.0, NS appkit-1038.36 Version 10.6.8 (Build 10K549))
of 2014-07-03 on bonbon
Configured using:
`configure --with-ns'
Configured features:
RSVG IMAGEMAGICK DBUS ACL GNUTLS LIBXML2 ZLIB
Important settings:
value of $LANG: de_DE.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
ESC [ ? 1 ; 2 c ESC x r e p o r t - e m a c s - b u
g RET
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils xterm time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind cocoa ns multi-tty emacs)
Memory information:
((conses 8 81518 6143)
(symbols 24 17883 0)
(miscs 20 32 176)
(strings 16 11312 3556)
(string-bytes 1 289486)
(vectors 8 7574)
(vector-slots 4 346198 1936)
(floats 8 64 283)
(intervals 28 258 201)
(buffers 512 12))
--
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#17909: 24.4.50; #'read-char fails with non-ASCII characters on the TTY
2014-07-03 14:52 bug#17909: 24.4.50; #'read-char fails with non-ASCII characters on the TTY Aidan Kehoe
@ 2014-07-03 15:42 ` Andreas Schwab
2014-07-03 16:30 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2014-07-03 15:42 UTC (permalink / raw
To: Aidan Kehoe; +Cc: 17909
From NEWS:
* Incompatible Lisp Changes in Emacs 24.4
** `read-event' does not return decoded chars in ttys any more.
As was the case in Emacs 22 and before, the decoding of terminal
input, according to `keyboard-coding-system', is not performed in
`read-event' any more. But unlike in Emacs 22, this decoding is still
done before `input-decode-map', `function-key-map', etc.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#17909: 24.4.50; #'read-char fails with non-ASCII characters on the TTY
2014-07-03 15:42 ` Andreas Schwab
@ 2014-07-03 16:30 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2014-07-03 16:30 UTC (permalink / raw
To: Andreas Schwab; +Cc: Aidan Kehoe, 17909-done
tags 17909 notabug
thanks
>> From NEWS:
> * Incompatible Lisp Changes in Emacs 24.4
> ** `read-event' does not return decoded chars in ttys any more.
> As was the case in Emacs 22 and before, the decoding of terminal
> input, according to `keyboard-coding-system', is not performed in
> `read-event' any more. But unlike in Emacs 22, this decoding is still
> done before `input-decode-map', `function-key-map', etc.
Oops, indeed, the above text is incorrect. Whether the decoding is done
or not depends on the value of the `inherit-input-method' argument.
IOW, use (read-char nil t). Note that in many cases, `read-key' is
a better choice than read-char.
I changed etc/NEWS accordingly.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-03 16:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-03 14:52 bug#17909: 24.4.50; #'read-char fails with non-ASCII characters on the TTY Aidan Kehoe
2014-07-03 15:42 ` Andreas Schwab
2014-07-03 16:30 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.