emacs-devel
[Top][All Lists]
Advanced

[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 14:15:07 -0500

On Sun May 29 2011 Eli Zaretskii wrote:
> This should do what you want:
> 
>   (with-output-to-string (princ (encode-coding-string STRING 'utf-8)))
> 
> (the STRING argument should be the entire string that you want to send
> to that program of yours).

Thank you. This seems to do what I want.

> But this is crazy, IMO: Lisp code should not need to jump through the
> hoops like that to produce such an octal representation.  TRT is to
> have a special encoding for this

For what I want to do, this seems to be not a bottleneck. (I am
playing with a frontend for the program djvused.) -- I do not know
how common are rare my problem is to justify a new encoding for it.
Certainly, a new encoding goes much beyond my knowledge of these
things.

The web page http://billposer.org/Software/ListOfRepresentations.html
lists about 30 unicode escape formats which emacs possibly could
implement. I do not know how many of these formats are possibly
already implemented. For most of them this web page includes example
programs using it; and some of these programs appear to be more
common. For the particular format I need, this web page simply says
"used by various programs". So I don't know how common my particular
problem might be to justify such an effort. Maybe some other formats
described there would be yet more helpful for other people.

Roland



reply via email to

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