Open 375gnu opened 1 year ago
Search works fine for me when using German. I suspect the issue is that the case-insensitive searching is built on top of the standard library tolower
/towlower
functions, which may well be limited to the ASCII subset of characters. If so, the search would work if you capitalised the Cyrillic letters exactly the same as they are in the file.
Fix would then be to use either ICU casefolding or the string collation functions.
We should also try to eliminate the wchar
stuff as much as possible in favour of Unicode types like char16_t
https://en.cppreference.com/w/cpp/string/byte/tolower says that locale is taken into account:
Converts the given character to lowercase according to the character conversion rules defined by the currently installed C locale.
I'm stupid. Of course it doesn't work with multibyte encodings.
Describe the bug
Universe::findPath
doesn't work with localized names even wheni18n
parameter istrue
.To Reproduce Steps to reproduce the behavior:
sol/зямля
or any other full object name in your language.Expected behavior Object searched should be found, e.g. Earth in the example above.
Desktop (please complete the following information):