Tom Murphy VII (tom7) did such a thing. It's a partial C89 compiler that outputs only printable characters. In meta fashion, the compiler is compiled by itself to also contain only printable characters. The TXT and EXE files below are exactly the same.
Video: https://youtube.com/watch?v=LA_DrBwkiJA
Paper (PDF): http://tom7.org/abc/paper.pdf
Paper (TXT): http://tom7.org/abc/paper.txt
Compiler (EXE): http://tom7.org/abc/paper.exe