If you want to go directly to java strings use an IFSFileReader over an IFSFile or IFSFileDescriptor.
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of David Gibbs
Sent: Monday, May 04, 2009 1:53 PM
To: Java Programming on and around the iSeries / AS400
Subject: Re: Brain cramp: reading an IFS file from program running on PC
Gary L Peskin wrote:
Sorry, I'm confused about exactly what the problem is. What do you
mean "The bytes I'm getting in the properties are correct ... but they
are the ebcdic values, not unicode.". Do you mean that the String
javaVersion is coming out as gobbledygook or what?
When I look at the properties object (in debug) there are entries shown. And the byte values that are showing in the property object correspond to the EBCDIC bytes in the IFS file ...
From RDI debug:
value char[16] (id=63)
[0] ? [\u0091]
[1] ? [\u0081]
[2] ¥ [\u00a5]
[3] ? [\u0081]
[4] K [\u004b]
[5] ¥ [\u00a5]
[6] ? [\u0085]
[7] ? [\u0099]
[8] ¢ [\u00a2]
[9] ? [\u0089]
[10] ? [\u0096]
[11] ? [\u0095]
[12] ~ [\u007e]
[13] ñ [\u00f1]
[14] K [\u004b]
[15] õ [\u00f5]
From DSPF:
9181A581 4BA58599 A2899695 7EF14BF5 0D25 java.version=1.5
So the data is being read from the input stream, but it's not being translated from EBCDIC to Unicode.
Since the IFS file has CCSID 37 ... and the JT400 object knows this, I would expect the contents to be properly translated from CCSID 37 to Unicode.
david
--
IBM i on Power - For when you can't afford to be out of business
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.