From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: How to create a derived encoding? Date: Tue, 12 Oct 2004 11:09:11 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1097593812 12966 80.91.229.6 (12 Oct 2004 15:10:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Oct 2004 15:10:12 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 12 17:10:00 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CHOHo-0002v8-00 for ; Tue, 12 Oct 2004 17:10:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CHOOn-0004Mk-QF for ged-emacs-devel@m.gmane.org; Tue, 12 Oct 2004 11:17:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CHOOg-0004MW-Hs for emacs-devel@gnu.org; Tue, 12 Oct 2004 11:17:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CHOOf-0004M3-LM for emacs-devel@gnu.org; Tue, 12 Oct 2004 11:17:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CHOOf-0004Ld-CF for emacs-devel@gnu.org; Tue, 12 Oct 2004 11:17:05 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CHOH3-0004MS-SX; Tue, 12 Oct 2004 11:09:14 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id A218E8282EE; Tue, 12 Oct 2004 11:09:13 -0400 (EDT) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 621E64AC5A0; Tue, 12 Oct 2004 11:09:11 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 41DB48CA23; Tue, 12 Oct 2004 11:09:11 -0400 (EDT) Original-To: David Kastrup In-Reply-To: (David Kastrup's message of "Tue, 12 Oct 2004 02:10:00 +0200") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=0, requis 5) X-MailScanner-From: monnier@iro.umontreal.ca X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28305 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28305 > 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