BULK INSERT cannot load UTF-8 files with a non-ASCII field terminator - by Erland Sommarskog

Status : 

 


2
0
Sign in
to vote
ID 3105304 Comments
Status Active Workarounds
Type Bug Repros 1
Opened 10/1/2016 3:14:13 PM
Access Restriction Public

Description

You have a data file in UTF-8. The separator is outside the ASCII range. The file can be loaded with BCP. However. BULK INSERT does not seem to be able to handle the file.
Sign in to post a comment.
Posted by David Chennells on 5/21/2017 at 3:20 AM
The docs (at msdn: "Specify Field and Row Terminators (SQL Server)") say, "Any printable character". They do not say, "Any printable ascii character", so the product is not currently meeting this important promise.

Although it's well and good that the product supports "String of up to 10 printable characters", and this could be used to specify a bullet-proof terminator signature, Excel does not support importing text files with multiple sequential delimiters, so generating files with such a sequence would not support viewing/manipulating the data in Excel. In practical terms, we end up needing to use standard qualifiers, which are ugly.

There is value to supporting non-ascii field terminators so please fulfill the promise made in the docs.