1

A long time ago, I remember using an utility which dumps all (ASCII/UTF8) strings from an executable file. I'm now wondering how could I go about implementing this in C#.

Currently, I use an external utility that dumps the strings to a file, and then I read that file from my application. I'd now like to replace the external utility with some sort of a parser in C#.

How does the dump strings utility detect UTF8 string in a file, and how can I implement this in C#?

Howie
  • 2,760
  • 6
  • 32
  • 60
  • it seem explained [here](http://stackoverflow.com/questions/1025332/determine-a-strings-encoding-in-c-sharp). For easiness: http://utf8checker.codeplex.com/ – jay Feb 27 '13 at 13:22
  • That will determine whether the _whole_ file/stream is in whichever encoding. What I need is to extract strings from (binary) files. – Howie Feb 27 '13 at 13:52
  • 1
    I wrote a program many years ago that would locate and output ASCII/UTF8 strings. I never tried to make it do UTF-8. The source (in C) is available at http://mischel.com/toolutil/strings.zip. Shouldn't be too difficult to convert to C#. – Jim Mischel Feb 27 '13 at 14:03
  • 1
    re: the above. The program outputs ASCII and *Unicode* strings, not UTF-8. – Jim Mischel Feb 27 '13 at 15:39

0 Answers0