string length bug
Better bug description
Exit loop correctly when encoded string len is multiple of 7.