Home > Forum > Tips&Tricks > How to export xml file using UTF-8 encoding?

How to export xml file using UTF-8 encoding?
0

MVP

I'd add here that in previous versions this action didn't exist.
You could use a Add Attachment action, and inside an SQL query it should go like this if i remember correctly:

SELECT CONVERT(VARBINARY(MAX), 'hello world' COLLATE Latin1_General_100_CI_AS_SC_UTF8) AS Content, 'file1.txt' AS FileName;

in case of older compatibility level / sql server version change varbinary(max) to image.