Search in files

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Thomrima
Junior Member
Junior Member
Posts: 3
Joined: 2012-06-01, 12:02 UTC

Search in files

Post by *Thomrima »

Hello
I'm using the search function to seach a string in multiple text filese. Unfortunately some of the files are Unicode files, others are UTF-8 files (perhaps some ANSI files). If I click the checkbox Unicode TC finds it only in Unicode files, the same with UTF-8.
This behaviour seams to be new in TC 8.0 but I'm not sure about it.
Is there an ability to search in all files regardles their coding type?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No there isn't, sorry. It's not that easy to detect the encoding of a file. Some files like EXE files may even contain both ANSI text and Unicode UTF-16 (e.g. strings and resources).
Author of Total Commander
https://www.ghisler.com
Thomrima
Junior Member
Junior Member
Posts: 3
Joined: 2012-06-01, 12:02 UTC

Suggestion

Post by *Thomrima »

Ok, I see the problem. However what do you think about this:
Make it possible to check unicode and utf-8 (and ASCII) at the same time and search the files twice?
Thomrima
Junior Member
Junior Member
Posts: 3
Joined: 2012-06-01, 12:02 UTC

And ...

Post by *Thomrima »

And ...
what does the TC search if non of the three boxes (unicode,ASCII and UTF) is checked?
umbra
Power Member
Power Member
Posts: 876
Joined: 2012-01-14, 20:41 UTC

Re: And ...

Post by *umbra »

Thomrima wrote:what does the TC search if non of the three boxes (unicode,ASCII and UTF) is checked?
By default, it presumes ANSI encoding.
Windows 10 Pro x64, Windows 11 Pro x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, ANSI encoding with the current codepage for non-Unicode programs.
Author of Total Commander
https://www.ghisler.com
User avatar
Valentino
Power Member
Power Member
Posts: 709
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

I support the idea to allow selecting several encoding checkboxes at once. It's not trivial to make it fast, plus co-operation with Lister but it would be awesome.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, moving thread to suggestions forum.
Author of Total Commander
https://www.ghisler.com
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

It can't be too hard. It just needs one thread for reading data from disk to memory buffer and then separate threads for every search working on it. Result is zero slowdown on disk operations (everything is still read only once) and with no more than three parallel searches (ANSI, Unicode, UTF-8, although in theory even more different encodings could be added) it can slow down only some older single-core PCs. And even there, if user needs to search for all three variants, it's still better to do just one slower search than three separate ones.
Post Reply