emacs-devel
[Top][All Lists]
Advanced

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

Re: Case mapping of sharp s


From: Eli Zaretskii
Subject: Re: Case mapping of sharp s
Date: Sat, 21 Nov 2009 13:45:14 +0200

> From: Andreas Schwab <address@hidden>
> Date: Sat, 21 Nov 2009 10:33:47 +0100
> Cc: grischka <address@hidden>, address@hidden, address@hidden,
>       address@hidden
> 
> Eli Zaretskii <address@hidden> writes:
> 
> > CHAR_TO_BYTE could be expensive, yes.  But how else can you convert an
> > arbitrary character position to the corresponding byte position?  When
> > you scan forward, you know the byte length of a multi-byte UTF-8
> > sequence by the first byte, but what do you do when you scan backwards?
> 
> The first byte of a UTF-8 sequence is easily recognizable, so finding
> out the length of the previous UTF-8 sequence is nearly as easy (see
> DEC_POS).

I guess simple_search should use DEC_POS, then.




reply via email to

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