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: Tue, 4 Jul 2006 18:31:18 +0300 Message-ID: <200607041831.18435.pogonyshev@gmx.net> References: <200607040035.01379.pogonyshev@gmx.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1152026729 29289 80.91.229.2 (4 Jul 2006 15:25:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Jul 2006 15:25:29 +0000 (UTC) Cc: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 04 17:25:28 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 1Fxmlw-0005GA-Pk for ged-emacs-devel@m.gmane.org; Tue, 04 Jul 2006 17:25:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fxmlw-0001qL-31 for ged-emacs-devel@m.gmane.org; Tue, 04 Jul 2006 11:25:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fxmlg-0001pk-SG for emacs-devel@gnu.org; Tue, 04 Jul 2006 11:24:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fxmlc-0001pX-P1 for emacs-devel@gnu.org; Tue, 04 Jul 2006 11:24:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fxmlc-0001pU-Ie for emacs-devel@gnu.org; Tue, 04 Jul 2006 11:24:48 -0400 Original-Received: from [213.165.64.21] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1FxmzJ-0008Aq-PY for emacs-devel@gnu.org; Tue, 04 Jul 2006 11:38:58 -0400 Original-Received: (qmail invoked by alias); 04 Jul 2006 15:24:46 -0000 Original-Received: from unknown (EHLO [82.209.227.61]) [82.209.227.61] by mail.gmx.net (mp038) with SMTP; 04 Jul 2006 17:24:46 +0200 X-Authenticated: #16844820 Original-To: emacs-devel@gnu.org User-Agent: KMail/1.7.2 In-Reply-To: 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:56497 Archived-At: Kenichi Handa wrote: > In article <200607040035.01379.pogonyshev@gmx.net>, Paul Pogonyshev writes: > > > Say I have a string with various text properties set. If I then > > apply `decode-coding-string' to it, all the properties are lost. > > Is there a way to transfer properties from ``character beginning'' > > (i.e. first character of a number being combined during decoding) > > to the decoded character? > > In the current implementation, it's impossible. But, first > of all, why do you have text properties on unibyte string? > I think all text processing should be done after the string > is decoded. Bad. OK, here is my task: I have a C string in the sources, possibly containing encoded characters, like "foo bla \xc2\xa9", the last thing being the UTF-8 copyright characters. I want to decode the string (can do that) _and_ know where particular characters begin. Currently I set text property `point' on character beginnings, but `decode-coding-string' eats them :( Can anyone see a different solution, maybe ugly if nothing else? (Except that custom implementation of `decode-coding-string' doesn't count as a solution ;) Paul