Lister: Text with backslash not found sometimes

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
WolfgangK
Junior Member
Junior Member
Posts: 18
Joined: 2008-06-15, 12:07 UTC

Lister: Text with backslash not found sometimes

Post by *WolfgangK »

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
User avatar
Hacker
Moderator
Moderator
Posts: 13136
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Lister: Text with backslash not found sometimes

Post by *Hacker »

WolfgangK,
I couldn't find a documentation about this.
F3 - F7 - F1.

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.
User avatar
Hacker
Moderator
Moderator
Posts: 13136
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Lister: Text with backslash not found sometimes

Post by *Hacker »

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.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6708
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Lister: Text with backslash not found sometimes

Post by *Horst.Epp »

Hacker wrote: 2022-11-26, 14:52 UTC WolfgangK,
I couldn't find a documentation about this.
F3 - F7 - F1.

HTH
Roman
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
User avatar
Hacker
Moderator
Moderator
Posts: 13136
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Lister: Text with backslash not found sometimes

Post by *Hacker »

Horst.Epp,
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.
Poke45
New Member
New Member
Posts: 1
Joined: 2024-05-14, 08:07 UTC

Re: Lister: Text with backslash not found sometimes

Post by *Poke45 »

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
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister: Text with backslash not found sometimes

Post by *ghisler(Author) »

\t is interpreted as a tab character and \n as a new line when searching.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5217
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Lister: Text with backslash not found sometimes

Post by *white »

ghisler(Author) wrote: 2024-05-14, 09:22 UTC \t is interpreted as a tab character and \n as a new line when searching.
And \\ as a backslash character. This was already clear. The suggestion is to make this interpretation optional.

Moderator message from: white » 2024-05-14, 10:42 UTC

Moved topic
» from Total Commander (English) to TC suggestions (English)
Post Reply