How to add encoding to a Talend batch file

When you are experiencing encoding issues when executing your Talend job at the server or by executing the .bat file then you have to add the following code to your .bat file or project properties.

Code to add:

I have used utf-8 in this example but you can use every type of encoding.

Example code

%~d0 cd %~dp0 java -Dfile.encoding=utf-8 ${talend.job.jvmargs} -cp ${talend.job.bat.classpath} ${talend.job.class} ${talend.job.bat.addition} %*


Add the encoding directly to the batch file

1: Open the yourTalendJob_run.bat file
2: Add the code (-Dfile.encoding=utf-8) behind java

Batch file

Add encoding to projectsettings

1: Go to –> edit project properties
2: Build –> Shell setting –> Bat
3: Add the code above

Change encoding BAT project settings




One Comment

Leave a Reply