January 29, 2026 at 10:11 pm
Hello SSC Community,
I am running into and issue with SSIS creating a text file from a SQL query. Apparently, there is a known issue that SSIS cannot produce a text file without NON UTF-8 characters without some kind of workaround. I am using VS 2026, and the issue still remains in the latest version. 
I changed the code page to 65001 (UTF-8) and changed the data types to Unicode String [DT WSTR] and that created a text file with just the header. Does anyone know of this issue and have a workaround?
Any assistance would be greatly appreciated!
Dave
The are no problems, only solutions. --John Lennon
January 30, 2026 at 4:25 pm
A few more details, please. For example, it would be good to know...
SQL Server version?
Data stored as NVARCHAR in table or CAST to NVARCHAR in SELECT statement?
Converted to UTF-8 in a Data Conversion step?
January 30, 2026 at 4:54 pm
Also, are you sure that the issue you're seeing isn't related to Notepad++ (if that is the program you're using to check the file)?
It might just be that the file is created without a BOM and the editor doesn't realize that the file is UTF-8 and therefore opens it as if it were an ASCII file.
https://stackoverflow.com/questions/28625337/ssis-ansi-flatfile-always-saved-as-utf-8-w-o-bom
February 2, 2026 at 1:05 pm
Hello Kaj,
Thank you for your response. I am using SQL version 2022 and VS version 2026. The package was written in SQL version 2016. (Perhaps I need to upgrade the package?)
Yes, I am using notepad++ to view the file. I believe that the client is saying the file is failing in their system because it has non UTF-8 characters. I will double check that.
Dave
The are no problems, only solutions. --John Lennon
February 2, 2026 at 2:55 pm
hum... I would query the client and see how they are loading the file (to whatever system) and what are the chars they consider NON UTF-8.
or is it that they are complaining about the possible BOM marker at start - if so they should be able to strip it.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply