Sql-server – SQL Server imports data in wrong charset with SSIS

character-setmigrationsql serversql-server-2005ssis

I have a flat file which I am importing into a SQL Server table using a SSIS package. The code page is set to 65001.

However, when I run a

SELECT * FROM tableName

the data appears mangled. For some reason it is not being stored in Unicode. The column is nvarchar, so that should not be an issue.

Also, if I insert data manually, the data is stored as expected.

What could be going wrong?

Best Answer

The columns in the connection manager that your datasource is using need to be defined as "Unicode String (DT_WSTR)".