I am trying to save XML content with encoding="ISO-8859-1" standalone="yes"
into a SQL Server 2008 XML column. I am doing this using Entity Framework.
However doing this throws the following error
XML parsing: line 1, character 60, unable to switch t开发者_如何学编程he encoding
However when I try to save XML content with encoding UTF-16, it is saved without any error.
Does anyone have any inputs regarding this?
The encoding width must match the datatype width
So don't send:
- UTF-8 and nvarchar/xml
- UTF-16 and varchar
Also see Trying to store XML content into SQL Server 2005 fails (encoding problem) whcih links to http://social.msdn.microsoft.com/forums/en-US/sqlxml/thread/d40ef582-4ffe-4f4b-b6b8-03c6c0ba1a32/
精彩评论