I'm using FOR XML PATH
to create an XML
inside SQL Server 2014
and I would like to save it as an UTF-8
file.
Is it possible to do this without using an external tool to convert the file?
Seems like this was fixed in SQL Server 2014 SP2 and can be done using the BCP tool:
To export UTF-8 data to SQL Server, use the BCP utility and run the following command:
bcp "query" out "drive:path\file_name" -c -C 65001
Using EXECUTE xp_cmdshell around this would probably fix the problem.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.