Search code examples
dos

Strange looking characters printed on the DOS console


I am writing a simple DOS utility that uses the findstr utility to search for certain phrases in a HTML log file. Whenever findstr finds a match, it will print the match on the console. I am seeing strange characters printed on the console that look something like:

.á374.á.á0.á.áif.ácity.á=.á"94606.á.á.á.á.á

Any idea what might be going on? Is there a switch in findstr that I should be using?


Solution

  • It looks like your HTML log file probably contains UTF-8 encoded data, but findstr (or your console) doesn't support UTF-8 output and is trying to interpret everything in Latin-1.