Handling for unicode surrogate pairs