GNOME Bugzilla – Bug 539293
Search/Replace with german ß replaces one letter more
Last modified: 2009-12-30 16:27:10 UTC
I have gedit 2.22.3 (Package 2.22.3-0ubuntu1) with Hardy. If I try to Search/Replace something with a german ß one letter too much is replaced. Example: I want to change every occurence of "Behebungsmaßnahme" to "Maßnahme" in a whole Text. So I do a search/replace "Behebungsmaß" -> "Maß" Now in the text the words reads "Maßahme", without the "n" Doing a search "Behebungsmaß" in she search/replace dialog highlights "Behebungsmaßn" - one letter too much. And that's what is being replaced.
I can confirm this behaviour. Maybe utf-8 encoding isn't handled correctly because 'ß' has 2 bytes and therefore overwrites the next character. 'ÄÖÜäöü' are handled correctly though, very strange.
This seems to be closely related to Bug #496780. I would expect your guess to be right, that 2 byte letters overwrite adjacent characters. As for the umlaut characters, are those 2 byte characters? I thought they were single byte characters.
After looking into it a bit, it appears that the problem most likely originates somewhere in the gtk_source_iter_forward_search function in gtksourceiter.c from gtksourceview. I'll look into fixing it and submitting a patch upstream.
This is a duplicate of bug 168247
Yep it looks like a duplicate indeed. *** This bug has been marked as a duplicate of bug 168247 ***