Importing a UTF-8 Log File -
08-26-2009
, 12:26 PM
First off, I apologize if I am posting to the wrong group. Also, I am not
very familiar with work with different file source encoding, so please
excuse my ignorance.
I need to be able to import a log file into a SQL 2000 table that uses the
UTF-8 text encoding. However, I've been getting invalid characters (i.e.
for the French language accents) appearing in the table. I have been able
to import the data correctly if I first save the file to Unicode encoding,
but this will not really be an option because this file is going to be
automated and received several times a day.
So how do I import this file so that the data appears correctly? I'd like
to save it as a DTS package, and here is the process I've run through using
SSMS 2008:
1. Launch the Import Wizard.
2. Options that I have selected in the General tab of the Flat File Source:
Locale: English (United States)
Unicode: Deselected
Code page: 1252 (ANSI Latin I)
Format: Ragged right (this is how the file is)
Text qualifier: Cannot change, set to <none>
Header row delimeter:{CR}{LF}
Header rows to skip: 0
Column names in the first data row is deselected
3. In the Advanced tab:
ColumnDelimeter: {CR}{LF}
DataType: string [DT_STR]
OutputColumnWidth: 2000
TextQualified: True
When you look at the Preview window (as well as if you proceed with the
import), the invalid characters appear.
Thank-you,
Rubens |