Summary: z390 seems to ignore the COPDEPAGE option for input files.
I recently updated to Java 19 from Oracle:
https://download.oracle.com/java/19/latest/jdk-19_linux-x64_bin.tar.gz
One of my assembler source files has the character 0xA6 for a broken
vertical bar, which is a valid character for the ISO-8859-1 encoding.
This should come out as X'6A' in the listing (EBCDIC encoding IBM1047
for a vertical bar). Instead, with the new version of Java I get
the three character sequence 0xEF, 0xBF, 0xBD which is the UTF-8
"replacement character" used when a character is not recognised.
This is what Java gives when a character 0xA6 is encountered
when reading a UTF-8 character stream.
I don't think z390 is honouring the CHARSET option for the input.
I have a file TEST.MLC which just declares a single vertical
bar character using DC (see attachment).
With the old version of java, if I run this command:
java -classpath z390.jar -Xrs mz390 TEST 'CODEPAGE(ISO-8859-1+IBM1047+LIST)'
I get X'8D' in the listing, not the expected X'6A'
If I set the environment variable LC_CTYPE to en_GB.ISO-8859-1
then it works (I get X'6A' in the listing) but when I use
the new version of Java it stops working.
The TEST.ERR file with the old version of Java and the environment
variable set says:
MZ390 Default ascii Charset codepage is - ISO-8859-1
MZ390 Selected ascii Charset codepage is - ISO-8859-1
without the environment variable setting I get:
MZ390 Default ascii Charset codepage is - UTF-8
MZ390 Selected ascii Charset codepage is - ISO-8859-1
and I get this result with the new version of Java regardless
of the setting of LC_CTYPE.
Note: If I run this command:
java -classpath z390.jar -Xrs mz390 TEST 'CODEPAGE(UTF-8+IBM1047+LIST)'
I get this result in TEST.ERR:
MZ390 Default ascii Charset codepage is - ISO-8859-1
MZ390 Selected ascii Charset codepage is - UTF-8
This is saying that I have selected codepage UTF-8:
but the listing still contains X'6A' for the vertical bar.
Conclusion: It seems that z390 is using the default codepage
for input files, regardless of the setting of the CODEPAGE option
and regardless of what it says in the ERR file.
With older versions of Java I could change the default codepage
by setting the environment variable LC_CTYPE to the required codepage,
but the latest version of Java does not seem to honour this variable.
--
Martin
Dr Martin Ward | Email:
mar...@gkc.org.uk |
http://www.gkc.org.uk
G.K.Chesterton site:
http://www.gkc.org.uk/gkc | Erdos number: 4