Subject: bug#13084: boyer_moore crashes with certain characters in the case table

From: Kenichi Handa <[email-masked]>
Date: Thu, 13 Dec 2012 22:39:29 +0900

In article <[email-masked]>, Eli Zaretskii <[email-masked]> writes:

> In addition, I'd suggest that Handa-san (or someone else) takes a good
> look at the code that sets up the simple_translate table in
> boyer_moore, because the constants there, like 0200 and 0x3F, and all
> the talk about characters that belong "to the same charset and row"
> smell of pre-Unicode (a.k.a. "MULE") representation of characters.
> For now, I disabled boyer_moore for unibyte characters beyond 160,
> because my reading of the code is that simple_translate and the
> supporting code cannot handle that.  Maybe I'm wrong.

I have not yet checked the code, but what I remember is that
search_buffer checks the search string and decides which to
use; boyer_moore or simple_search.  If all equivalent
characters of all non-ASCII characters in the search string
are in the same character group, we can use boyer_moore.
Here, A and B belongs to the same character group iff A and
B has the same multibyte sequence except for the last byte.
In this condition, we should be able to use the table
simple_translate.

---
Kenichi Handa
[email-masked]