Search in files
Moderators: Hacker, petermad, Stefan2, white
Search in files
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?
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?
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
Suggestion
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?
Make it possible to check unicode and utf-8 (and ASCII) at the same time and search the files twice?
Re: And ...
By default, it presumes ANSI encoding.Thomrima wrote:what does the TC search if non of the three boxes (unicode,ASCII and UTF) is checked?
Windows 10 Pro x64, Windows 11 Pro x64
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, ANSI encoding with the current codepage for non-Unicode programs.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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.