Fix for Unicode surrogate pairs