Output has garbled characters when AutoSys executes script on a Japan Windows server.
search cancel

Output has garbled characters when AutoSys executes script on a Japan Windows server.

book

Article ID: 436137

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

When a script is executed via the AutoSys agent on Japanese Windows servers, garbled characters are generated in the job logs. However, when the same script is triggered manually on the server, the output does not contain any garbled characters.

Environment

 

  • Operating System: Windows (specifically Japan localized servers)

  • Component: AutoSys Workload Automation Agent

 

Resolution

The difference in output is often caused by a mismatch in the Active Code Page (chcp) between the interactive user session and the session created by the AutoSys agent. To troubleshoot and resolve this:

  1. Identify the working Code Page: Run the script manually from the command line (as the job owner) where it works correctly. Add the following line to the script to capture the code page: chcp > c:\checkchcp_manual.out

  2. Identify the AutoSys Code Page: Run the job through AutoSys and capture the code page: chcp > c:\checkchcp_autosys.out

  3. Compare and Align: Compare the results. If they differ, you must ensure the AutoSys environment uses the correct code page.

  4. Permanent Fix: * Explicitly set the code page at the beginning of your script using the chcp command (e.g., chcp 932 for Japanese Shift-JIS).