.NET DataSet.GetXml() - what's the default encoding?
问题 Existing app passes XML to a sproc in SQLServer 2000, input parameter data type is TEXT; The XML is derived from Dataset.GetXML(). But I notice it doesn't specify an encoding. So when the user sneaks in an inappropriate character into the dataset, specifically ASCII 146 (which appears to be an apostrophe) instead of ASCII 39 (single quote), the sproc fails. One approach is to prefix the result of GetXML with <?xml version="1.0" encoding="ISO-8859-1"?> It works in this case, but what would be