added u8strlen which understands UTF-8 encoding