Backported a test for lone surrogates support in io.StringIO.