lister hex search produces strange result

English support forum

Moderators: Hacker, petermad, Stefan2, white

User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

lister hex search produces strange result

Post by *Sheepdog »

@all

When I open any file in Lister and search for a hex string 'FF' there is found '98 but not 'FF''. If I search for '98' there is found '7E' but not '98'.
The result doesn't change if I check 'case sensitive' or not.

Can anyone confirm this bahavior?

BTW: If I search for '5f' search works fine.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Right @ home

Post by *Clo »

2Sheepdog
:) Hi Stefan !
¤ I just tested the Search with FF, it works fine under Win 98SE.
* I had not the other hexa numbers you quote in the tested file. I'll test with other files and under XP-Pro later, because I have to turn off the PCs (big storm !)…

EDIT : works too with 98
:mrgreen: V G
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

I tried it also, works correctly on my XP pro.
I switched to Linux, bye and thanks for all the fish!
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

Also works fine by me on Win2k Prof with TC 6.03a. (both FF and 98)
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

2Sheepdog
when i check Options>ASCII (DOS Charset) and do search for hex string i get unpredictable results
using XP Home
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2ts4242
Wow, confirmed!
I switched to Linux, bye and thanks for all the fish!
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

I've found what is the problem!!! Lister takes the symbol with the hex-code entered, then converts it into the encoding chosen (ASCII) and only then it looks for a new symbol with the new hex-code which can differ from the first one. If this is so, all hex-codes below 80 must be found perfectly in any encoding.
For exapmle, I took the symbol with code FF. I use Russian codepage, this symbol in ANSI is Russian letter 'я' - the last symbol of Russian alphabet in lowercase. When I choose ASCII, the same letter is now encoded with EF, and Lister finds this symbol when I search in ASCII-mode. (on other codepages the result will be different).
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

if you do search for 41 (hex ascii code for "A" character) you will get 41 or 61 (the code of "a")
the same thing for the other characters from a to z
this happened with ANSI option too, so what is wrong!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

I might have something to do with case sensitivity?
I switched to Linux, bye and thanks for all the fish!
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

ts4242
SanskritFritz
Didn't you forget about checkbox "Case sensitive" in Find dialog? ;) :lol:
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

Flint wrote:ts4242
SanskritFritz
Didn't you forget about checkbox "Case sensitive" in Find dialog? ;) :lol:
as far as you search for a hex value there is no meaning for "Case sensitive" i think it must disabled when i check [Search hex string] :wink: :lol:

flint said
I've found what is the problem!!! Lister takes the symbol with the hex-code entered, then converts it into the encoding chosen (ASCII) and only then it looks for a new symbol with the new hex-code which can differ from the first one. If this is so, all hex-codes below 80 must be found perfectly in any encoding.
if this true you must get the same result each time you press F5 to find the next occurrence of "FF" but this doesn't happen, each time you do find next you get a different result. :roll:
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Fonts---

Post by *Clo »

>>> To All
:) Hello !

¤ I don't know if it's helpful, but below are the fonts I use in Lister (from wincmd.ini) under Win 98 Se :

Code: Select all

[Lister]
...........
Font2=OCR A Extended,-13,b
Font3=Arial,-15
...........
Wrap=1
BgColor=16777147
FgSelColor=8388608
BgSelColor=16767487
...........
Font1=Courier New,-13,b
* Note : "Case sensitive" was unticked in my tests.

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

ts4242 wrote:if you do search for 41 (hex ascii code for "A" character) you will get 41 or 61 (the code of "a")
the same thing for the other characters from a to z
this happened with ANSI option too, so what is wrong!
I remeber a thread were this is mentioned by another user (maybe on the german forum). @ghisler told that this by design: You may type in a hex Value but if you don't check case sensitive search presents both the upper and lower case of the character you search for. So your observation is right but it's no bug - by definition of @ghisler.

@flint
Thanks, you're right. The ANSI-ASCII Conversion is the problem. If I use ANSI or even 'variable char widht' search works fine. So as I disabled the 'autodetect of font while starup' the search didn't work as expected.

@Clo
I tried it out: There is no coherence between lister -font and hex search result.

@ghisler
Is it possible to add another checkbox in lister-search to apply this ASCII-ANSI conversion?

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

ts4242, Sheepdog,
Sheepdog is right - case sensitive does indeed have an effect even if you are searching using hex.

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
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

Hacker wrote:ts4242, Sheepdog,
Sheepdog is right - case sensitive does indeed have an effect even if you are searching using hex.

HTH
Roman
Ok, but this seems a little strange!
when i search for hex "4D 5A" i need these two bytes value exactly not the ASCII characters of these values. if i need the string simbly i will search for "MZ"
so as i said before it is logical to disable "Case sensitive" when searching for hex.

searching for a hex is very important if you want to be a "Hacker" :lol:
Post Reply