do not recalculate strlen in each loop in utf8 lib