Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
stautner_a
Contributor III
Contributor III

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
Labels (2)
5 Replies
Anonymous
Not applicable

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
stautner_a
Contributor III
Contributor III
Author

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
Anonymous
Not applicable

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
stautner_a
Contributor III
Contributor III
Author

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. 
JJS1
Contributor II
Contributor II

I had the same problem. I set up my components using UTF-8 in the Advanced Settings, and it worked fine when I ran the job stand-alone, but when I built the job, I had foreign currency symbols that were once again scrambled in my output file. If you add the following setting to your JVM run time arguments and then build the job, the problem should be solved - at least this worked for me. -Dfile.encoding=UTF8
DfileEncodingJVMParameter.png