Merge pull request #3489 from akoeplinger/fix-latin1-surrogatepair