minetest-mods / unified_inventory

An extensible inventory mod which allows searching crafting and browsing for recipes in the same dialogue.
Other
48 stars 38 forks source link

case sensitive search in non-latin input  #116

Open codexp opened 6 years ago

codexp commented 6 years ago

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.

numberZero commented 6 years ago

Lua doesn’t support Unicode, and Minetest doesn’t provide any support either.

P.S. «Разетка»? Is that misspelled Russian word, or?..

codexp commented 6 years ago

sorry, did not study it at all, it's my native language. «Разетка» seems to be Belorussian.

MoNTE48 commented 4 years ago

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.

adikalon commented 3 days ago

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