use the correct length for unicode strings