Should it work on code points instead of chars? There seems to be valid code points that have some of the characters that we are escaping as a low surrogate and in that case I think we should not escape?