differentiate terminal and child program encoding