llvm/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py

#!/usr/bin/env python

import sys

getattr(sys.stdout, "buffer", sys.stdout).write(b"a line with bad encoding: \xc2.")
sys.stdout.flush()