Page 1 of 1

Search should not be case sensitive

Posted: Wed Jul 05, 2023 7:35 pm
by datarza
If I enter something is search box, should be displayed everything without restriction.

Example: for `ПлА`, `пла` or `ПЛА` should be displayed everything, what contains `пла` in any case
image_2023-07-05_153113201.png
image_2023-07-05_153113201.png (41.16 KiB) Viewed 2161 times
image_2023-07-05_153214852.png
image_2023-07-05_153214852.png (55.33 KiB) Viewed 2161 times
PS: not only for train overview windows, for all searches

Re: Search should not depends on Upper/Lower case

Posted: Wed Jul 05, 2023 8:00 pm
by Rseding91
Thanks for the report however we don't attempt to do case translation for non-English character sets as the complexity is too much for us to maintain.

Re: Search should not depends on Upper/Lower case

Posted: Wed Jul 05, 2023 11:46 pm
by datarza
Rseding91 wrote:
Wed Jul 05, 2023 8:00 pm
to do case translation for non-English character sets as the complexity is too much for us to maintain
What?
images.jpg
images.jpg (4.96 KiB) Viewed 2122 times

Could you try to find another person for the answers who is more experienced?

Re: Search should not depends on Upper/Lower case

Posted: Mon Jul 10, 2023 7:16 pm
by waitofaiorur
Uh... He's one of the main developers. If he says it's too complex it probably is.
Internationalization is troublesome at the best of times.

Re: Search should not depends on Upper/Lower case

Posted: Mon Jul 10, 2023 10:23 pm
by datarza
waitofaiorur wrote:
Mon Jul 10, 2023 7:16 pm
Internationalization is troublesome at the best of times.
I don't believe you.

Re: Search should not depends on Upper/Lower case

Posted: Fri Jul 21, 2023 6:14 am
by lm-
datarza wrote:
Mon Jul 10, 2023 10:23 pm
waitofaiorur wrote:
Mon Jul 10, 2023 7:16 pm
Internationalization is troublesome at the best of times.
I don't believe you.
Believe it.

It is hard. With english char, to make characters lower or upper, all you have to do is unset or set specific bit. And that's it. It's easy. It's efficient. Uses almost no memory to do.

Now for the unicode characters... not so trivial, because upper/lower spacing is not symmetrical in unicode and thus you need a table with mapping. This table is big. And you need a hash map which is a lot heavier that just flipping a bit. Or ordinary array, they will be quick but will waste a lot of ram for nothing, since there will have to be empty fields. And these gaps will be small enough so that OS won't be able to optimize memory usage of it.

So yeah, case insensitive for anything other than plain ASCII *IS* a *LOT* harder. Whole internationalization is a mess already. First computers were basically designed with only ascii characters in mind.

Re: Search should not depends on Upper/Lower case

Posted: Mon Jul 24, 2023 5:23 pm
by KeepResearchinSpoons
the stance of "call me a manager here!" is not something that would get you anywhere :>

but that aside; I've looked the thread back in the day, yet decided it was not worthy of any input when I glanced over the other posts of the author.
nowadays I still believe this thread is not of any interest per itself.

however the underlying issue is indeed is.
Thus I would like to cover both bases, hehehe.


First of all,
this one thread can be easily killed away as a yet another duplicate of this old one
since this thread per se does not REALLY introduce anything new or worthy, putting it under-the-carpet might be for the best overall.
the "original" duplicate will never know that yet another one has bitten the same dust; neither will the original get more attention; but it is the duplicate all the same.


Secondly,
the issue of unicode collation is largely misunderstood in general. Even here we can see both parties either over-value or under-value it. (and both being right, though)
cpp does not natively support unicode
total complete collation is crazy hard

With that said, let's imagine we were trying to actually solve this issue at hand.
(since, well, it is VERY popular one, kinda a FAQ item at this point)
apparently for cyrillics it is kinda easy


Would be nice to have this issue addressed in some form of a best-effort approach.
But let's speak on workarounds for mods as well.
scripting scripting if you please take me across the raging seas

afterall, this issue still needs an "escalation", mostly for awareness reasons though.
the collation hack also linked above probably solves the issues of all the players (or most) that are being repeatedly referred to this old post (as for duplicates) each time they re-discover it.
"the fix" does not introduce much value of itself, but saves a day for all the newbs perceiving the "limited" search utility as "permanently broken since long before" in the current state of things.


To my personal opinion, going with a modding-interface-request for this specific sort of collation for Lua might be easier, since this one seems to be eternally perma-stuck in "duplicates". But well, all things have a natural chance to change for the better sooner or later with enough love and time to it.

Have fun and may the gearz force be with u! :>

Re: Search should not depends on Upper/Lower case

Posted: Sat Jul 29, 2023 6:22 pm
by datarza
lm-: was you frozen in the 1980s and melted just now? - https://www.google.com/search?q=app+loc ... or+dummies

Incredible nonsense, many times moaned feature for seven years, seven string of code to implement, stubbornness of Factorio staff is amazing

Posted: Sun Jul 30, 2023 10:39 am
by jamiechi1
I agree with @datarza on this one. I can't imagine the coding on this to be that difficult.

Re: Search should not depends on Upper/Lower case

Posted: Mon Jul 31, 2023 10:29 am
by coppercoil
jamiechi1 wrote:
Sun Jul 30, 2023 10:39 am
I agree with @datarza on this one. I can't imagine the coding on this to be that difficult.
You are not familiar enough with Unicode. Some players are so incompetent, so they don't even know what to google for.

On the other hand, maybe devs could implement lowercase for some of most common and relatively simple languages.

Re: Search should not be case sensitive

Posted: Mon Jul 31, 2023 3:16 pm
by Koub
[Koub] Moderator-me speaking. The request was clear, I'm sure the devs have understood what's requested. There's no need fighting publicly on this forum over whether the request is easy or hard to implement. And certainly not calling each other names.
So keep calm, constructive, and polite, or I will enforce calmness myself.