unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Roland Winkler" <winkler@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: converting octal escape sequences to utf-8 and back
Date: Sun, 29 May 2011 14:15:07 -0500	[thread overview]
Message-ID: <19938.39739.48665.285116@gargle.gargle.HOWL> (raw)
In-Reply-To: <E1QQbTY-0006gE-Qe@fencepost.gnu.org>

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	other threads:[~2011-05-29 19:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-29  0:27 converting octal escape sequences to utf-8 and back Roland Winkler
2011-05-29  2:57 ` Leo
2011-05-29  5:40   ` Michael Welsh Duggan
2011-05-29  6:35     ` Roland Winkler
2011-05-29 20:05       ` Michael Welsh Duggan
2011-05-29  6:47     ` Eli Zaretskii
2011-05-29  6:58       ` Roland Winkler
2011-05-29  8:35         ` Eli Zaretskii
2011-05-29 19:15           ` Roland Winkler [this message]
2011-05-29  8:50         ` Thien-Thi Nguyen
2011-05-29  3:00 ` Eli Zaretskii
2011-05-29  3:48   ` Roland Winkler
2011-05-30 22:39 ` Randal L. Schwartz
2011-05-31  7:14   ` Harald Hanche-Olsen
2011-05-31 17:06     ` Randal L. Schwartz
2011-05-31 20:13       ` PJ Weisberg
2011-05-30 22:54 ` Stefan Monnier
2011-05-31 21:06   ` Roland Winkler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19938.39739.48665.285116@gargle.gargle.HOWL \
    --to=winkler@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).