Issue with standalone job and UTF-8 in TOS-DI 6.1.1

Highlighted
One Star

Issue with standalone job and UTF-8 in TOS-DI 6.1.1

Hi!
I've created a job using UTF-8 in all components. When I build a standalone job with build job and run it with the <<jobName>>_run.bat or <<jobName>>_run.sh files, then the character encoding isn't UTF-8 and I have wrong encoded characters in my output. I can do a workaround and fix the problem with manually editing the <<jobName>>_run.bat and <<jobName>>_run.sh and adding a -Dfile.encoding=UTF-8 parameter to the files.
My questions are.
Why are the settings in the components ignored?
Where can I change the template of the <<jobName>>_run.bat and <<jobName>>_run.sh so i always have the -Dfile.encoding=UTF-8 parameter?
Where can i force the build job process to use UTF-8?
Thank you for answering the questions.
Alex
Highlighted
Moderator

Re: Issue with standalone job and UTF-8 in TOS-DI 6.1.1

Hi,
Have you tried to add this line on the .bat file to see if it works?
%~d0
 cd %~dp0
 java -Dfile.encoding=utf-8 -Xms256M -Xmx1024M -cp .
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
One Star

Re: Issue with standalone job and UTF-8 in TOS-DI 6.1.1

Hi Sabrina,
as I've written in the original post, I've done that as a workaround. I'm still wondering, why the encoding setting in the component doesn't work, when building the job but work, when I run the job inside TOS-DI and that there seems to be no option for editing the template for the .bat or .sh file. In my oppinion that must either be fixed or there must be a hint in the documentation.
Thank you for helping,
Alex
Highlighted
Moderator

Re: Issue with standalone job and UTF-8 in TOS-DI 6.1.1

Hi,
How did you use UTF-8  in all your components? Did you use any context value? Could you please give us more information about your current job or does this issue repro on all jobs?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
One Star

Re: Issue with standalone job and UTF-8 in TOS-DI 6.1.1

Hi,
How did you use UTF-8  in all your components? Did you use any context value? Could you please give us more information about your current job or does this issue repro on all jobs?
Best regards
Sabrina

I used it with setting the encoding type UTF-8 in the advances setting of the component. 

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog