[Top][All Lists]

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

Re: How to create a derived encoding?

From: Stefan Monnier
Subject: Re: How to create a derived encoding?
Date: Tue, 12 Oct 2004 11:09:11 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

> 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.


reply via email to

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