locked
Automatic mail attachment must be ni utf8 format RRS feed

  • Question

  • I use msdb..sp_send_dbmail but the attached file should be in utf8 format. How can I do this ?

    Thank you,

    Hans

    Tuesday, April 4, 2017 4:51 PM

All replies

  • Hello Hans,

    sp_send_dbmail (Transact-SQL) sends the attachments files as they are and don't convert anything here; so you just have to create the files with UTF-8 encoding.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Tuesday, April 4, 2017 4:58 PM
  • Hello Olaf,

    But I send the query as a cmd string, so the output file is created in the background. An I don't know how to influence the background to create this file in utf8 format.

    Tuesday, April 4, 2017 5:12 PM
  • SQL Server engine supports only Unicode & ASCII for output, but not UTF-8.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Tuesday, April 4, 2017 5:13 PM