Update tests.
Add fallback for UnicodeEncodeError in output.