fix issue 11350

Do not throw on bad UTF inside of a C callback