Convert unicode character offsets to UTF-8 byte offsets when needed