Handle character encoding slightly better when converting to sequence file