Ticket UUID: | 413706 | |||
Title: | OS/400 patch 3 of 3 | |||
Type: | Patch | Version: | None | |
Submitter: | smatzek | Created on: | 2001-04-04 14:04:16 | |
Subsystem: | None | Assigned To: | dgp | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2001-04-04 22:19:38 | |
Resolution: | Invalid | Closed By: | dgp | |
Closed on: | 2001-04-04 15:19:38 | |||
Description: |
This patch contains two fixes. The first fix is an added method execOS400. This method is called to execute commands in the POSIX shell. It was necessary to have a separate execOS400 from the execUnix because the 'cd' to the working directory had to be quoted differently to avoid an error message when the user does not have a home directory. What was happening was the cd and the directory path were being interpreted as two commands. The cd command would try to change directories to the user home, and if it didn't exist, the TCL user would get an error message to this effect every time a command is exec'ed. The second fix is in the cmdProc method. OS/400 runs in EBCDIC vs ASCII character encodings. Thus, any call to an POSIX command such as ls will return it's results in an EBCDIC code page. When the result is returned to Java under the original implementation, it was interpreted incorrectly and resulted in unprintable characters. The fix in the attached file checks for the existence of a Java property tcl.lang.childEncoding, that the user of TCL can set to the name of their code page, for instance "Cp037" is the English EBCDIC code page. If this property exists, the stderr and stdout of the process returned by Runtime.exec are converted from the given code page. If the property doesn't exist, it will use the original implementation (no conversion). This fix has been tested on OS/400 v4r4, v4r5, and and early version of v5r1. | |||
User Comments: |
dgp added on 2001-04-04 22:19:38:
Logged In: YES user_id=80530 The attached patch is for Jacl, not Tcl. It should be contributed to the tcljava project, not here. smatzek added on 2001-04-04 21:04:18: File Added - 4948: ExecCmd.java |
Attachments:
- ExecCmd.java [download] added by smatzek on 2001-04-04 21:04:17. [details]