Transfer data from csv files to mssql server with special characters

One Star

Transfer data from csv files to mssql server with special characters

Hello all,
I am working on a TOS project importing data from csv files to mssql server database. The problem is that special characters in German like "ä ü ö" inserted into db tables became "??".
I know the problem is DB saved those special characters not as Unicode chars.
How we resolve this problem, if anyone that had met and resolved the problem please help me.
Thank a lot.
Nghia
Six Stars

Re: Transfer data from csv files to mssql server with special characters

What is the encoding of your CSV files? Change the encoding accordingly in the tfileinputdelimited (component which is reading your csv file) to read the characters in your file correctly.
The option to change the encoding is under advanced settings of the component.
One Star

Re: Transfer data from csv files to mssql server with special characters

Perfect, i have changed the tfileinputdelimited encoding to UTF-8 then it work now.
Thank you very much.
Nghia
One Star

Re: Transfer data from csv files to mssql server with special characters

Hello,
May i have a question that:
If the csv files encoding is not UTF-8 the there is any way Talend can convert the data to UTF-8 before import to Db?
Before now my imports by SSIS work good without care with csv file encoding.
Thanks
Six Stars

Re: Transfer data from csv files to mssql server with special characters

There are ways to convert file encoding through batch scripts and also through java. You can incorporate both these codes (whichever is more suitable to you) into your talend job at whichever point you need to convert your file through the following components:
1) tjava - if you want to use java code to convert your file encoding to UTF-8
2)tsystem - to run batch commands to do the same
Six Stars

Re: Transfer data from csv files to mssql server with special characters

Hi,
I just came across this component which can change the file encoding in talend called tchangeFileEncoding. Its under data quality.
It changes the encoding of the input file of given encoding type (you can choose from a drop down) and gives the output file with the changed encoding of your choice. You can give custom encoding also if the encoding you are looking for is not listed there.
One Star

Re: Transfer data from csv files to mssql server with special characters

Thank Remy.
There is a very simple solution from Viswanath.Ch. and it work.
http://www.talendforge.org/forum/viewtopic.php?pid=127321#p127321
Thanks for your support