Input flat file is encoded with ISO 8859-1
.
The database has default codepage 1252
.
Is the only way to change codepages to use a Data Conversion transformation?
Yes, I know that 8859-1
and 1252
are very close, but I am trying to do this formally correct.
I must be missing something. It appears that I must use a Data Conversion transform, click on each and every field, and choose the codepage, then deal with the "Copy of " field names one by one. This does not seem believable.
When reading data from a flat-file there are different methods to convert the code page:
The easiest way is to open the flat file using a text editor and save it using another encoding. You may be able to do this using notepad (not sure if 1252 is supported) as an example:
Try to change the code page from the flat file connection manager, if implicit conversion is supported between code pages it may not affect the text.
You can add a derived column with the following expression:
(DT_STR,50,1252)[InputColumn]
As you mentioned you can use a data conversion transformation to convert the code page.
You can import data to a table having Nvarchar columns, then use an SQL command to insert rows into the destination table (having varchar columns)