TSQL FOR XML Exporting ACTUAL UTF-8 Encoded data
问题 We have a process that writes XML (Using SQL's FOR XML). When it was executed via SQLCMD in a batch file the output was in UTF-8 format (specifically 8-bit ascii characters become 2 byte). When I do the same thing through Execute SQL Command in SSIS it's not UTF-8 encoded. Here's a simple example. The ® should become 2 bytes: SELECT 'Diversity® Certified' as fldAgentLastName FOR XML PATH('agent'), ELEMENTS, TYPE, ROOT('agents') The output is: Diversity® Certified it SHOULD be: Diversity®