Open codexp opened 6 years ago
Lua doesn’t support Unicode, and Minetest doesn’t provide any support either.
P.S. «Разетка»? Is that misspelled Russian word, or?..
sorry, did not study it at all, it's my native language. «Разетка» seems to be Belorussian.
Something like this is needed. https://github.com/MultiCraft/MultiCraft/tree/master/builtin/utf8lib Yes, this does not look perfect, but it is the best implementation on pure Lua 5.1! I'll try to do PR in the future.
For the Russian language, there is a function for byte-by-byte character replacement, it can be found here: https://nashitut.ru/posts/35-registronezavisimyi-poisk-v-mode-unified-inventory.html. I think it's possible to do something similar for the most popular languages. Or add the ability to change the lowercase conversion function for third-party mods
For non-latin captions search is case sensitive, which means players can't find items by their names if they have capital first letter.
Example: Cyrillic "разетка" won't find "Разетка" item. Example: Cyrillic "окно" will have different results as "Окно".
for this I also have created an issue on gitlab.