add line length and make it utf-8 compatible