Fix line endings, unicode decoding