Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Location
    Boston, MA
    Posts
    7

    Unanswered: 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?

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Pardon my ignorance, but what is UTF-16LE ?

  3. #3
    Join Date
    Aug 2003
    Location
    Boston, MA
    Posts
    7
    I should have been more explicit Little Endian...

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    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.

  5. #5
    Join Date
    Aug 2003
    Location
    Boston, MA
    Posts
    7
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •