SSIS-平面文件始终为ANSI从未UTF-8编码 [英] SSIS - Flat file always ANSI never UTF-8 encoded
本文介绍了SSIS-平面文件始终为ANSI从未UTF-8编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
具有非常简单的SSIS程序包:
Have a pretty straight forward SSIS package:
- 通过视图获取数据的OLE DB源(db表nvarchar或nchar中的所有字符串列).
- 派生列以格式化现有日期并将其添加到数据集中(数据类型DT_WSTR).
- 多播任务,用于在以下情况之间分割数据集:
- OLE DB命令将行更新为已处理".
- 平面文件目标-的连接管理器设置为代码页65001 UTF-8,并且未选中Unicode.所有字符串列都映射到DT_WSTR.
- OLE DB Source to get data via a view, (all string columns in db table nvarchar or nchar).
- Derived Column to format existing date and add it on to the dataset, (data type DT_WSTR).
- Multicast task to split the dataset between:
- OLE DB Command to update rows as "processed".
- Flat file destination - the connection manager of which is set to Code Page 65001 UTF-8 and Unicode is unchecked. All string columns map to DT_WSTR.
每次我运行此程序包时,都要在Notepad ++中打开其ANSI平面文件,而不是UTF-8.如果我选择Unicode选项,则文件为UCS-2 Little Endian.
Everytime I run this package an open the flat file in Notepad++ its ANSI, never UTF-8. If I check the Unicode option, the file is UCS-2 Little Endian.
我做错了什么-如何将平面文件进行UTF-8编码?
Am I doing something wrong - how can I get the flat file to be UTF-8 encoded?
谢谢
推荐答案
OK - seemed to have found an acceptable work-around on SQL Server Forums. Essentially I had to create two UTF-8 template files, use a File Task to copy them to my destination then make sure I was appending data rather than overwriting.
这篇关于SSIS-平面文件始终为ANSI从未UTF-8编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文