5

I get this error on a File Destination Task, do you know what the cause is and how to fix it ?

Package Validation Error

------------------------------
ADDITIONAL INFORMATION:

Error at export data to csv [Flat File Destination [187]]: The code page on input column "..." (958) is 1252 and is required to be 65001.

ta

2 Answers 2

11

The issue is caused by a clash in code pages between 1252 (i.e. Windows-1252) in SQL Server and 65001 (i.e. UTF-8) that your CSV file is expecting.

I believe one solution to the issue would be to CAST your source columns to NVARCHAR in the initial SELECT from the database, or use a Data Conversion task to convert them to Unicode strings.

An alternative would be set the code page in the Flat File Connection Manager to 1252 ANSI - Latin.

3
  • 1
    yes, it worked in both ways, convert to NVARCHAR , but also using Data derivation task. I have not tried to set the Flat File Connection Manager to 1252 ANSI - Latin. Thanks a lot! Commented Dec 11, 2014 at 12:54
  • 1
    SQL Server is such a stupid engine. Of course varchar is a subset of nvarchar. I don't get it why it needs an explicit cast. Commented Sep 26, 2017 at 8:08
  • The alternative to set the Flat File Connection Manager is my choice! Commented Feb 14, 2018 at 16:36
0

I had the same issue where My error was as follows:

The code page on Flat File Destination.Inputs[Flat File Destination Input].Columns[Number] is 65001 and is required to be 1252.

Then I was doing google and I found very interesting and correct results from the below website: Here in the question, itself answer is given. After that, I just change code-page-1252 in flat-file property from connection manager and it worked for me

1
  • Acknowledging the source of your answer is applauded. Adding the important points into the answer is the preferred approach. Commented Apr 19, 2020 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.