emacs-devel
[Top][All Lists]
Advanced

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

Re: `decode-coding-string' question


From: Stuart D. Herring
Subject: Re: `decode-coding-string' question
Date: Wed, 5 Jul 2006 09:34:34 -0700 (PDT)
User-agent: SquirrelMail/1.4.3a-11.EL3

> 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.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




reply via email to

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