The correct implementation should be something like:
isBinary := UpperCase(headerBuf[0]+headerBuf[1]+headerBuf[2]+headerBuf[3]+headerBuf[4])<>'SOLID';
Right now, it will almost always conclude isBinary = False for any file because, first, the logic is backwards (presence of non printable chars should result in binary, not ascii), and also it misses CR/LF, so the only reason it works for ascii stl files is because two wrongs make a right. Bad, bad way to detect stl type.
Sorry, I'm not in theme. Can you made improvements for this units yourself and send patch?