Lister: Text with backslash not found sometimes
Moderators: Hacker, petermad, Stefan2, white
Lister: Text with backslash not found sometimes
If you search for a text with a backslash inside, it is sometimes not found in Lister.
This happens if the character after the backslash results in a valid code, e.g. "text\something" works quite well, but "text\this" does not. That is because instead of searching for the literal text, the \t is replaced with a tab character and the search tries to find "text<tab>his" instead. (Same thing for \n,)
I couldn't find a documentation about this. I thought the codes might be the same as in C++ or Java, but it seems \r is not a valid code. I am also not sure if \n searches only for <CR><LF> (Windows default) or any combination of <CR> and <LF> or only for some of them.
The way it is now, can easily lead to mistakes. If you copy a text containing a backslash and then paste it into the search dialog, Lister may say that it doesn't exist even though it does. Unless you remember that there might be an issue with backslashes and double all of them. That is especially bothersome when you are searching for various filepaths in several logfiles.
While it is a very good idea to be able to search for special characters, I think, it should be an option you turn on explicitly like RegEx, because most of the time you are not searching for tabs or line breaks. Coloring valid codes in the search dialog might be another possibility, at least then you see immediately that there is something special in the text.
BR, WolfgangK
This happens if the character after the backslash results in a valid code, e.g. "text\something" works quite well, but "text\this" does not. That is because instead of searching for the literal text, the \t is replaced with a tab character and the search tries to find "text<tab>his" instead. (Same thing for \n,)
I couldn't find a documentation about this. I thought the codes might be the same as in C++ or Java, but it seems \r is not a valid code. I am also not sure if \n searches only for <CR><LF> (Windows default) or any combination of <CR> and <LF> or only for some of them.
The way it is now, can easily lead to mistakes. If you copy a text containing a backslash and then paste it into the search dialog, Lister may say that it doesn't exist even though it does. Unless you remember that there might be an issue with backslashes and double all of them. That is especially bothersome when you are searching for various filepaths in several logfiles.
While it is a very good idea to be able to search for special characters, I think, it should be an option you turn on explicitly like RegEx, because most of the time you are not searching for tabs or line breaks. Coloring valid codes in the search dialog might be another possibility, at least then you see immediately that there is something special in the text.
BR, WolfgangK
Re: Lister: Text with backslash not found sometimes
WolfgangK,
HTH
Roman
F3 - F7 - F1.I couldn't find a documentation about this.
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: Lister: Text with backslash not found sometimes
Moderator message from: Hacker
Moved to the English forum.
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: Lister: Text with backslash not found sometimes
That doesn't help much for this problem
In my Editors (AkelPad, PSPad, Syn2) you can enable RegEx to search for tabs with \t
and disable RegEx to search for literal \t
In native lister there is no difference with enable or disable RegEx.
It always finds tabs when searching for \t
So the only way is to double the backslash.
Unfortunately my preferred text Lister plugin (CudaLister) has the same problem.
Windows 11 Home, Version 24H2 (OS Build 26100.2161)
TC 11.50b5 x64 / x86
Everything 1.5.0.1383a (x64), Everything Toolbar 1.5.1, Listary Pro 6.3.1.81
QAP 11.6.4 x64
TC 11.50b5 x64 / x86
Everything 1.5.0.1383a (x64), Everything Toolbar 1.5.1, Listary Pro 6.3.1.81
QAP 11.6.4 x64
Re: Lister: Text with backslash not found sometimes
Horst.Epp,
Perhaps you misunderstood what I was quoting and replying to.
Roman
Perhaps you misunderstood what I was quoting and replying to.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: Lister: Text with backslash not found sometimes
just a bump on this issue i.e. if there is any chance a future version of TOTAL COMMANDER could include the feature to give the user control over settings which potentially sabotage text searches on the backslash character. i have been using TOTAL COMMANDER's text search feature for years and only recently realised in some cases text searches were retrieving invalid results (e.g. try searching for "\\tsclient" in a source file which contains that exact text: no results will be found)
i also use an excellent program called NOTEPAD 2 and that program's text search options include a checkbox against whether or not you wish to "Transform backslashes"; something like that seems appropriate here?
i am updating this discussion board as on brief glance it seems to be the most recent, but the same topic is discussed in other threads as well
e.g.
viewtopic.php?t=47864
viewtopic.php?t=27146
i also use an excellent program called NOTEPAD 2 and that program's text search options include a checkbox against whether or not you wish to "Transform backslashes"; something like that seems appropriate here?
i am updating this discussion board as on brief glance it seems to be the most recent, but the same topic is discussed in other threads as well
e.g.
viewtopic.php?t=47864
viewtopic.php?t=27146
- ghisler(Author)
- Site Admin
- Posts: 49232
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Lister: Text with backslash not found sometimes
\t is interpreted as a tab character and \n as a new line when searching.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Lister: Text with backslash not found sometimes
And \\ as a backslash character. This was already clear. The suggestion is to make this interpretation optional.ghisler(Author) wrote: ↑2024-05-14, 09:22 UTC \t is interpreted as a tab character and \n as a new line when searching.
Moderator message from: white » 2024-05-14, 10:42 UTC
Moved topic
» from Total Commander (English) to TC suggestions (English)
» from Total Commander (English) to TC suggestions (English)