add support for utf16 surrogate pairs