Looking for ascii text inside files doesn't work at all

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Well do you guys have an idea what "grep" is?
Yes it comes from the *NIX world but is also known beyond ... looking
for an ascii text string in a file.

I'm really desperate now, as this simply does not work on either WinXP
nor Server 2003, but did (and still does) in my old Win2000! I even retested to be absolutely sure, and yes it works.
It's really annoying if I really need this stuff and have no 3rd-party
tools handy (like UltraEdit) that I have to dual-boot into my old 2000!
The strings appear in plain ascii and are human readable when
hex-editing them, so Windows _ought_ to find them!

But it did not, so I began to investigate a little more...

Let's have a file as an example which you all should have:
\Program Files\Common Files\Microsoft Shared\Speech\SAPI.DLL

Hex-editing the file reveals that there is a string called "reloc" right at the beginning of the file.
So if text search (aka grep) worked, this should work too shouldn't it?
But it definitely does NOT.
It seems that Microsoft have indeed made a major error here. The second field (captioned "A word of phrase in the file:") works almost the same as the uppermost one.

A test:

- I make sure that the option "look in sub-directories" is activated
- I set the "Look in:" directory to
\Program Files\Common Files\Microsoft Shared\Speech\SAPI.DLL
- Now I input 'cpl' into the field in the middle.
=> I will get two results: sapi.CPL and spCPLui.dll in the 1033 sub-directory.

And now it comes:
I change the term in the _middle_ input field to 'i.cpl'.
Now the only result I get is sap[i.cpl] because it matches with 'i.cpl'.

But wouldn't you expect this middle field is for looking INSIDE the files, i. e. in the binary code?
That's how it worked in Windows 2000. And apparently this doesn't work anymore.
Or if, please tell me how.

The "reloc" string was successfully found in sapi.dll with a 3rd-party tool, UltraEdit32.

-Andreas

.



Relevant Pages

  • Looking for text inside files does not work at all
    ... for an ascii text string in a file. ... Hex-editing the file reveals that there is a string called "reloc" right ... So if text search (aka grep) worked, this should work too shouldn't it? ... That's how it worked in Windows 2000. ...
    (microsoft.public.windowsxp.help_and_support)
  • Deutsch nach ASCII konvertieren
    ... "ascii", $string, sub { ... also das to_ascii offenbar einen Latin-1-kodierten String will. ... Gefunden habe ich weiterhin eine kleine Sub, die die Ersetzung ... Ähnlich wie bei Variante 1 wird hier die Menge der Ersetzungs-Regexen ...
    (de.comp.lang.perl.misc)
  • UnicodeEncodeError in Windows
    ... def getdamage: ... """reads each line of war report ... """Build a string from a warrior's stats ... As I understand it the error is related to the ascii codec being ...
    (comp.lang.python)
  • Best integer to string routines
    ... ASCII string, it can be in any format - zero-terminated, leading ... Convert byte value to ASCII hex string ... Convert byte value to ASCII decimal string ...
    (alt.lang.asm)
  • Re: Writing extended ascii characters to text file.
    ... so in order to get real ASCII codes you should use the GetBytes ... method of an Encoding instance configured for the ASCII encoding (as far as ... again, you've got bytes, not characters. ... > string line; ...
    (microsoft.public.dotnet.languages.csharp)