all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: How to create a derived encoding?
Date: Tue, 12 Oct 2004 11:09:11 -0400	[thread overview]
Message-ID: <jwvsm8kkmgm.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <x5vfdgbxuv.fsf@lola.goethe.zz> (David Kastrup's message of "Tue, 12 Oct 2004 02:10:00 +0200")

> So if there was a tolerably working way to derive a special encoding
> (which will be used as a process output encoding) that reconverts
> control sequences like the above before composing unicode characters
> from the resulting utf-8 stream, this would appear to be by far the
> fastest and convenient way to go about this problem.

I'm not sure what you've tried and what are the constraints under which
you're coding, but I'd have assumed that you can do:

1 - assume the raw TeX output with its funny quoted bytes is in the
    current temp buffer.   The buffer is in unibyte mode.
2 - do a search&replace of ^^NN to the corresponding byte.
3 - call decode-coding-region with the appropriate coding system.
4 - set the buffer to multibyte.

If the step number 2 is too slow, you can most likely implement a CCL
program that does it faster.


        Stefan

  reply	other threads:[~2004-10-12 15:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-12  0:10 How to create a derived encoding? David Kastrup
2004-10-12 15:09 ` Stefan Monnier [this message]
2004-10-12 15:27   ` David Kastrup
2004-10-12 16:23     ` Stefan Monnier
2004-10-12 21:02       ` David Kastrup
2004-10-14 11:12         ` Oliver Scholz

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

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

  git send-email \
    --in-reply-to=jwvsm8kkmgm.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.