nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] searching for certain UTF8 characters also finds ghosts


From: Mark Majeres
Subject: Re: [Nano-devel] searching for certain UTF8 characters also finds ghosts
Date: Sat, 21 Mar 2015 12:54:34 -0700

>> > Strangely this happens only for characters in the range
>> > U+00A0 to U+00BF, which baffles me.  (I've tested it with
>> > ?, ?, ?, ?, ? -- they all get doubly found -- but also
>> > with ?, ?, ?, ?, ?, ?, and ? -- they all are found once.)
>
> Hmm.  Your mail is UTF8-encoded, but these characters haven't
> come across properly.  Did you see them okay?

They came in the first time just like they look now :)

Yes, shifting one multi-byte char to the left is a little bit of work.
It's not very pretty.


IMO, strstrwrapper() should return the position to the left of
haystack if the search is not found.  I think the check for
openfile->current_x == 0 could then be tossed out of your patch.
Otherwise, the calls to move_mbleft and move_mbright look good.

--Mark



reply via email to

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