See Suffering from buffering
In reply to Re: printing without escape sequences "n" by data64 in thread printing without escape sequences "n" by nwkcmk