Getting the following thrown error when calling a web service. Have googled without any results other then people asking the same question.
Server was unable to process request. ---> The surrogate pair (0xD860, 0x27) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF)."}
System.Exception {System.Web.Services.Protocols.SoapException
The web service returns a series of simple text fields from a view by running the view and opening a dataset and reading in the data and returning it as formatted XML.
EDIT
Was able to resolve this using the following regex which strips out the bad characters which happened to be MSWord/Excel characters
string re = @"[^\x09\x0A\x0D\x20-\xD7FF\xE000-\xFFFD\x10000-x10FFFF]";
return Regex.Replace(text, re, string.Empty);
What might be happening is that:
эба'encoded in IBM866.encodingdeclaration, so the parser assumes that it’s UTF-8.