2012年2月23日星期四

BCP and Unicode (UTF-16LE)

I am attempting to load a UTF-16LE file using the BCP or Bulk Insert into a SQL Server 2000 db and have had limited success. I have been able to do it using the GUI DTS tools but would prefer to use the BULK INSERT or BCP.
Has anyone done this before?Pardon my ignorance, but what is UTF-16LE ?:confused:|||I should have been more explicit Little Endian...|||Never done this before, but if you can find out the code page, you can use the -C (capital C) switch for bcp to specify it. Otherwise, if you need to do this column by column, you will be reading up on format files. Hope this helps.|||I appreciate the response...

I have created a format file for the import that species SQLNCHAR as the datatype. The column width specifications are correct as well as the row terminators and col. delimiters. The prefix length is set to 0 since the file is being generated by an outside system.

I have tried the -C option for the UTF-16LE codepage but it seems to expect a number like 932 for SHIFT-JIS.

没有评论:

发表评论