nickstenning/honcho — pull request #54 by jeethu (2013-12-03 12:01:40+00:00)
Title: UnicodeDecodeError raise if child process writes invalid utf8 characters to stdout

On my Mac running OSX 10.9, I've got honcho running mysql, solr and a couple of other things. Sometimes solr ends up printing some invalid string and honcho handler thread hangs with the following traceback.

```
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/Users/jeethu/Envs/bb/lib/python2.7/site-packages/honcho/process.py", line 198, in _enqueue_output
line = line.decode('utf-8')
File "/Users/jeethu/Envs/bb/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x8e in position 131: invalid start byte
```

No further lines from the process get logged since the printer thread has raised an exception and is essentially hung. I've got a patch for this. I'll attach it to this PR, when ready.