Question: searchtext with non-ASCII characters

searchtext and SearchText do not work well with non-ASCII characters.
Strangely, StringTools:-Search is OK.

restart;
m:=convert([77,97,116,104,195,169,109,97,116,105,113,117,101], bytes);
                      m := "Mathématique"
seq(searchtext(m[i..7], m), i=1..7);
                      1, 0, 0, 4, 0, 0, 1
seq(SearchText(m[i..7], m), i=1..7);
                      1, 0, 0, 4, 0, 0, 7
seq(StringTools:-Search(m[i..7], m), i=1..7);
                      1, 2, 3, 4, 5, 6, 7

 

Please Wait...