Hello,
For a specific usecase, I want users to be able to import a custom CSV file. The import of this file triggers inserts in more than one table. Therefore, the standard import function Thinkwise offers is not sufficient at the moment.
In order to tackle the problem. I have a start task which has 2 relevant task parameters:
- file_name (data_type=NVARCHAR(512) and control=File upload). Here, the users selects a file from file explorer
- file_data (data_type=VARBINARY_MAX). Here, the varbinary file data is stored
The file which is being uploaded is UTF-8 Encoded. After using
CAST(@csv_varbinary as varchar(max))
I can see the VARCHAR information. However, special characters like “ö” do not seem to work with this method: “ö” becomes: “ö”.
Any advice on how to proceed from here? After doing some research on the internet I tried the following statements already:
select
@test_varb,
CAST(@test_varb as varchar(max)),
CAST(@test_varb as varchar(max)) COLLATE Latin1_General_100_BIN2_UTF8,
CAST(@test_varb as varchar(max)) COLLATE Latin1_General_100_CI_AI_SC_UTF8,
CONVERT(VARCHAR(MAX), @test_varb, 1208),
CONVERT(VARCHAR(MAX), @test_varb, 1)