fix charset and linebreaks