emacs-devel
[Top][All Lists]
Advanced

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

Re: `decode-coding-string' question


From: Paul Pogonyshev
Subject: Re: `decode-coding-string' question
Date: Wed, 5 Jul 2006 19:50:21 +0300
User-agent: KMail/1.7.2

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:
> >
> >   #("©foo" 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!
> 
> This is a horrible hack, but could you take the "©foo" that you get
> (without properties), turn it into "©-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




reply via email to

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