From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: `decode-coding-string' question Date: Wed, 5 Jul 2006 19:50:21 +0300 Message-ID: <200607051950.21849.pogonyshev@gmx.net> References: <200607040035.01379.pogonyshev@gmx.net> <200607051911.45299.pogonyshev@gmx.net> <43882.128.165.123.18.1152117274.squirrel@webmail.lanl.gov> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1152122760 14211 80.91.229.2 (5 Jul 2006 18:06:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Jul 2006 18:06:00 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 05 20:05:50 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FyBkX-0008JG-30 for ged-emacs-devel@m.gmane.org; Wed, 05 Jul 2006 20:05:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FyBkW-0004Nf-LN for ged-emacs-devel@m.gmane.org; Wed, 05 Jul 2006 14:05:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FyBkH-0004Kj-PR for emacs-devel@gnu.org; Wed, 05 Jul 2006 14:05:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FyBkG-0004KV-2R for emacs-devel@gnu.org; Wed, 05 Jul 2006 14:05:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FyBkF-0004KS-Vm for emacs-devel@gnu.org; Wed, 05 Jul 2006 14:05:04 -0400 Original-Received: from [213.165.64.21] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1FyBkG-0004Ay-H6 for emacs-devel@gnu.org; Wed, 05 Jul 2006 14:05:04 -0400 Original-Received: (qmail invoked by alias); 05 Jul 2006 18:05:01 -0000 Original-Received: from unknown (EHLO [194.158.213.90]) [194.158.213.90] by mail.gmx.net (mp015) with SMTP; 05 Jul 2006 20:05:01 +0200 X-Authenticated: #16844820 Original-To: emacs-devel@gnu.org, herring@lanl.gov User-Agent: KMail/1.7.2 In-Reply-To: <43882.128.165.123.18.1152117274.squirrel@webmail.lanl.gov> Content-Disposition: inline X-Y-GMX-Trusted: 0 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:56592 Archived-At: Stuart D. Herring wrote: > > I do. But I need to know where they begin in the buffer (containing > > the encoded C string.) I don't see a way to keep this information at > > present... :( > > > > For instance, if the buffer only contains "\xc2\xa9foo", I'd like > > to receive a string with the following text properties: > > > > #("=A9foo" 0 1 (point 0) 1 2 (point 8) 2 3 (point 9) 3 4 (point 10)) > > > > The first characters actually takes 8 characters in the buffer! >=20 > This is a horrible hack, but could you take the "=A9foo" that you get > (without properties), turn it into "=A9-f-o-o-", then reencode it and look > for the '-'s you added? It might run into trouble if there were -s in the > string already, but you could always compare the original and -ed strings > to resolve that. Probably I don't have any other option, I have to try something like this... Or maybe reencode character by one... Thanks! Paul