> On 12. Mar 2025, at 16:03, Yury V. Zaytsev via mc > <[email protected]> wrote: > >> I tried my old mc on one system (4.8.22 too) and *[[:space:]]* selects the >> file with "nonlocal" chars if I try, assume Eugen's renaming should work as >> well (although I didn't check, whether the regex interpretion works similar >> in both cases) >> >> But being in an utf charset too I can't imagine why "à" or "á" shall be >> "nonlocal" here. Seems more likely there is some charset mismatch on Eugen's >> system, at least for the acting user. Maybe there are "invisible" chars in >> the name in his environment… > > ... but thanks for reproducing it. I can confirm that it doesn't seem to work > correctly on 4.8.33. I'll try a debug build on the master to see what happens.
Looking deeper into the code, it does mc_search (arg, DEFAULT_CHARSET, fe->fname->str, search_type); where DEFAULT_CHARSET is ASCII. The attached patch "fixes" the problem, but I'm afraid it's much more complicated. Even if we declare that menu files must be UTF-8 and that's it, I'm not sure that this takes care of correct matching when single-byte locales are used. Maybe the source string should be recoded somehow as well? It would be good to hear what Andrew has to say about this.
fix-usermenu-matching.patch
Description: Binary data
-- mc mailing list [email protected] https://lists.midnight-commander.org/mailman/listinfo/mc
