如何将UTF-8平面文件导入SQL Server 2008 R2? [英] How do you import UTF-8 flat files into SQL Server 2008 R2?

查看:282
本文介绍了如何将UTF-8平面文件导入SQL Server 2008 R2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一堆需要将UTF-8编码的平面文件导入到SQL Server 2008 R2数据库中.散装插件无法识别直径,也似乎无法接受UTF-8.

I have a bunch of UTF-8 encoded flat files that need to be imported into a SQL Server 2008 R2 database. Bulk inserts are not able to identify the diameters nor seems to accept UTF-8.

我了解到有很多关于SQL Server 2008如何处理UTF-8编码的文章,但是我想寻找任何更新的答案,因为这些文章中的大多数都是过时的.

I understand that there is a number of articles on how SQL Server 2008 deals with UTF-8 encoding, but I'm sort of looking for any updated answers as most of those articles are old.

是否可以通过在插入之前转换它们或在插入期间运行的过程来将这些平面文件输入数据库,来做些什么?

Is there anything I can to do in order to get these flat files into the database either by converting them before an insert or a process to run during the insert?

我想避免手动转换每个.此外,我尝试创建的SSIS包可以读取和分离数据.它似乎无法移动数据. :(

I want to stay away from manually converting each one. Furthermore, SSIS packages that I've attempted to create can read and separate the data. It just can't move the data it seems. :(

平面文件由Java生成.无法将Java环境从UTF-8转换为任何其他编码.

The flat files are generated by Java. Converting the java environment from UTF-8 to any other encoding has been unsuccessful.

注意

我无意存储UTF-8数据.我的定界符很时髦,因为它是UTF-8.分隔列和行时,SQL Server无法读取字符.就是这样.

I have no intention of storing UTF-8 data. My delimiter is coming in funky because it's UTF-8. SQL Server cannot read the characters when separating the columns and rows. That's it.

推荐答案

不正确,您只需要选择代码页65001

Not true, you simply need to choose code page 65001

这篇关于如何将UTF-8平面文件导入SQL Server 2008 R2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆