[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Typing raw bytes
From: |
Benjamin Riefenstahl |
Subject: |
Re: Typing raw bytes |
Date: |
Mon, 21 Jan 2013 20:38:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
>> I just tried 0x80, 0x90, 0x85, 0xff and 0x7f which all worked.
>
> What do you mean by "worked"? Did you try to save them?
I set the coding system to iso-8859-1, set read-quoted-char-radix to 16,
inserted the characters with C-q 80 RET etc., saved the file and the
result was this:
$ hexdump -C test.bin
00000000 80 90 85 ff 7f |.....|
00000005
$
> Inserting raw bytes into a multibyte buffer is playing with fire.
I inserted ISO8859-1 characters with the knowledge that ISO8859-1 is a
one-to-one mapping from Unicode codepoints to bytes. This is
effectively how the Unicode codepoints U+0000 to U+00FF are defined, so
I expect that that coding system should work that way.
For the record, for testing I am using a GTK-based Emacs 24.2.92 on X11
(GNU/Linux), running "emacs -Q", my locale is UTF-8, even
keyboard-coding-system is utf-8-unix. I tried the same with "emacs -Q
-nw" and this also works the same.
benny
Re: Typing raw bytes, Ivan Andrus, 2013/01/20
Re: Typing raw bytes, Michael Welsh Duggan, 2013/01/20
Re: Typing raw bytes, Kenichi Handa, 2013/01/20
Re: Typing raw bytes, Stefan Monnier, 2013/01/20