[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: converting octal escape sequences to utf-8 and back

From: Roland Winkler
Subject: Re: converting octal escape sequences to utf-8 and back
Date: Sun, 29 May 2011 01:58:30 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

On Sun, May 29 2011, Eli Zaretskii wrote:
> This is an illusion: what is produced are 2 bytes, but when Emacs
> inserts that into the buffer where the results are displayed, the
> bytes are represented as ASCII strings.  Try writing the result to a
> file (e.g., with write-region) and you will see that what ends up in
> the file is simply the UTF-8 encoding of the character.  This is not
> what the OP wanted.
> IOW, encode-coding-string produces the encoding specified by its 3rd
> argument, not its ASCII representation.

...So it seems that emacs knows already what I would like to have (at
least its display engine). How can I achieve that I actually get this in
an output file, too? Are there some formulas that allow one to calculate
these octal sequences? Then it should be possible to construct the ascii
character sequences, too.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]