Catch broken UTF-8 to enable loading of buffers with broken lines

Fixes #321