From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.devel Subject: Re: converting octal escape sequences to utf-8 and back Date: Tue, 31 May 2011 16:06:52 -0500 Message-ID: <19941.22636.359245.891864@gargle.gargle.HOWL> References: <19937.37639.583480.682350@gargle.gargle.HOWL> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1306886010 32750 80.91.229.12 (31 May 2011 23:53:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 May 2011 23:53:30 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 01 01:53:26 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QRYkX-0000gK-1d for ged-emacs-devel@m.gmane.org; Wed, 01 Jun 2011 01:53:25 +0200 Original-Received: from localhost ([::1]:54060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRYkW-0002iL-2V for ged-emacs-devel@m.gmane.org; Tue, 31 May 2011 19:53:24 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRW9h-0006J9-Gy for emacs-devel@gnu.org; Tue, 31 May 2011 17:07:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRW9g-0005uy-Fx for emacs-devel@gnu.org; Tue, 31 May 2011 17:07:13 -0400 Original-Received: from tfkpsv.physik.uni-erlangen.de ([131.188.164.197]:25159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRW9e-0005uL-Du; Tue, 31 May 2011 17:07:10 -0400 Original-Received: from regnitz (unknown [202.20.0.151]) by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id 85A1B200A4; Tue, 31 May 2011 23:06:57 +0200 (CEST) In-Reply-To: X-Mailer: VM 8.2 trial under 23.3.1 (x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 131.188.164.197 X-Mailman-Approved-At: Tue, 31 May 2011 19:53:10 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:140006 Archived-At: On Mon May 30 2011 Stefan Monnier wrote: > You can try to convert the \302 and \247 to/from bytes by using `read' > and `prin1' (since Emacs also uses such a notation for its own Elisp > strings). As for converting those bytes to/from chars, just use > (en|de)code-coding-string. Thanks! The funny thing is that I am trying to make emacs interact with the program djvused that uses a rather lisp-like structure for its input and output. So using `read' and `prin1' is anyway a natural way to go. Once my code is a bit more mature, I'll post it on gnu-emacs-sources. Maybe it'll be helpful for others, too. Roland