Search selects the wrong ranges when there are multibyte characters before the match
Reported by Daniel Lucraft | January 21st, 2011 @ 09:04 AM
E.g. Searching for "foo" in this document:
Benedikt Müller
foo bar baz
Comments and changes to this ticket
-
delisa January 21st, 2011 @ 02:47 PM
I think this is related to StringScanner not being UTF-8 safe, at least for the pos() method, which returns length in bytes. I think I have a solution by doing a few conversions:
https://github.com/kattrali/redcar/commit/1f3303ad6aaedc9c7e7a40c9f...
Though it doesn't solve the problem of searching fr multibyte strings, just searching around them in text.
-
Daniel Lucraft January 21st, 2011 @ 02:55 PM
- State changed from new to open
Hmm, how is that performance-wise? I mean, there might be a lot of text to scan over...
Also, what's the problem with searching for multibyte strings? Is there another bug there?
-
delisa January 21st, 2011 @ 03:31 PM
It shouldn't affect performance, as it doesn't convert until its going to select a match. Not sure what's wrong with multibyte string searching yet. I couldn't get it working properly.
-
delisa March 10th, 2011 @ 06:30 AM
- State changed from open to hold
Fixed in master. Setting to hold for the next release.
-
Daniel Lucraft June 7th, 2011 @ 09:24 AM
- State changed from hold to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A programmer's text editor for Gnome.