proper text and binary handling in iris client

closes #831, closes #799