December 01, 2020, 08:14:52 pm
News: If your question is answered please put [RESOLVED] in the subject of the initial message.
Pages: [1]   Go Down
Author Topic: Bulk insert ruins special characters [RESOLVED]  (Read 7010 times)
Slowhand
Supporters
*

Stars: +0/-0
Offline Offline

Gender: Male
Awards:
Topic Necromancer
Posts: 4668


I code C#!


WWW
« on: November 15, 2007, 12:02:57 pm »

Hi,

I have a Integration Package that uses a bulk insert to read a CSV file into a table.
This file contains a lot of foreign names with special characters (like ç,ĝ,ň,ŏ).
The bulk insert can't handle these characters, though, because after the import the characters have been changed to things like ¶,∂,∏.
(And it throws in an error about a wrong codepage, although at a different column).
When I manually paste such a name into the database field, there's no problem, and SQL Server accepts it without trouble.

I suspect the problem might be in the code page, although I have no experience with these things.
I can select a certain code page for the bulk insert, but none of the code pages cover everything I want. (There are Turkish names, but also Albanian, Hungarian - all which can contain certain special characters).
« Last Edit: November 15, 2007, 12:39:29 pm by Slowhand » Logged


Slowhand
Supporters
*

Stars: +0/-0
Offline Offline

Gender: Male
Awards:
Topic Necromancer
Posts: 4668


I code C#!


WWW
« Reply #1 on: November 15, 2007, 12:39:04 pm »

I just heard one of the programmers had fixed it.

Appearantly you need to set the codepage on the Bulk Insert to 'ACP', whatever that might be.
Logged


Pages: [1]   Go Up
Print
 
Jump to: