Issue #3254041 by Krzysztof Domański: Use mb_strlen/substr instead of regular strlen/substr for UTF8 special chars support