test binary data passed to output

data is coerced to unicode (cast with 'replace', so no errors)