It only works on platforms where the OS differentiates between text and binary files, where input from text files is cooked by the OS before the program sees it. It follows then that it won't work on platforms that don't have this distinction (just about any modern OS besides the Windows derivatives doesn't), or with programs that explicitly request uncooked input from the OS.