Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.10.6, 1.11
-
None
Description
Current Situation
When a powershell job is started on a windows machine that has default Ansi Code Page=UTF the job ends with exit code=1
The message
[ERROR SCHEDULER-360 Error when accessing database table SCHEDULER_HISTORY [COM-8007007A The data area passed to a system call is too small. [WideCharToMultiByte]]] can be seen in the task log.
Desired Behaviour
No error should be thrown when a job is executed on a window system with default Ansi Code Page=UTF
Workaround
set current culture to InvariantCulture
$culture = [System.Globalization.CultureInfo]::InvariantCulture
[System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture
[System.Threading.Thread]::CurrentThread.CurrentCulture = $culture
Sample:
<?xml version="1.0" encoding="ISO-8859-1"?> <job order="no" stop_on_error="no" tasks="1" title="powershell job" process_class="/agent"> <script language="powershell"> <![CDATA[$culture = [System.Globalization.CultureInfo]::InvariantCulture [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture [System.Threading.Thread]::CurrentThread.CurrentCulture = $culture $culture dir ]]> </script> <run_time> </run_time> </job>
Attachments
Issue Links
- relates to
-
JS-1374 JobScheduler should support UNICODE
- Resolved
-
JS-1230 The encoding of the XML answer should be UTF-8
- Deferred
-
JS-1049 Encoding of XML configuration files should be respected
- Approved
-
JS-589 The command <modify_order/> should work if there are UNICODE characters in the order ID
- Dismissed
-
JS-1656 If an Order ID contains german umlauts it is not possible to delete or resume the order when using the built-in web server
- Known Issue