Thursday, October 18, 2007

SQL Server Integration Services – Unicode is not Unicode

Today I came across an UTF-8 (Unicode) file I should read into SQL Server using Integration Services (IS). Fortunately, it offers a check box "Unicode" so I though I simply activate this and I'm done.

Wrong! The flag "Unicode" inside the connection manager (for the Flat File source) does mean any Unicode it ONLY means "UTF-16". However, this is not noted inside the help:

Unicode

Indicate whether to use Unicode. If you use Unicode, you cannot specify a code page.

So, if you have to deal with UTF-8 file as I did, you need to deselect the "Unicode" check box and select as Code page "65001 (UTF-8)". Tricky.

No comments:

Post a Comment