[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
decode-coding-region returns octal escapes
From: |
Eli Zaretskii |
Subject: |
decode-coding-region returns octal escapes |
Date: |
Sat, 07 Feb 2009 14:00:57 +0200 |
To reproduce:
emacs -Q
M-x find-file-literally RET etc/tutorials/TUTORIAL.de RET
(The German tutorial is just an example, you can use any one, but
others might need different values of the 3rd argument to
decode-coding-region below.)
Now mark a region that includes non-ASCII characters, for example,
this one, on line 7 of the file:
da\337 die CONTROL-Taste gedr\374ckt sein mu\337
and type
M-: (decode-coding-region (mark) (point) 'latin-1 t) RET
The result is that the echo area shows this:
#("da\337 die CONTROL-Taste gedr\374ckt sein mu\337" 0 39 (charset
iso-8859-1))
and the *Messages* buffer shows this:
#("da\303\237 die CONTROL-Taste gedr\303\274ckt sein mu\303\237" 0 39
(charset iso-8859-1))
But I expected to see this in both cases:
#("daß die CONTROL-Taste gedrückt sein muß" 0 39 (charset iso-8859-1))
Is this a bug? If not, what is the explanation for what I see? Why
are raw bytes inserted instead of decoded characters?
- decode-coding-region returns octal escapes,
Eli Zaretskii <=