Fix #6011 - fixing surrogate characters
[roojs1] / undefined