|
Java itself always operates in Unicode for Strings or chars. How are you accessing the FlexLM service? Is this done over a socket InputStream/OutputStream. If so, these operate over a series of bytes. At some point, that series of bytes is converted to/from a String and this is where the problem occurs. The conversion usually happens with either a new String(bytearray) or bytearray = myString.getBytes() In either case, the platform default encoding is used, which is EBCDIC on the iSeries and zSeries and ASCII almost everywhere else. You can overide this by changing these calls to new String(bytearray, "US-ASCII") or bytearray = myString.getBytes("US-ASCII") This works if you have the source for the code that is converting the byte array to the String or vice-versa. Otherwise, you'll have to contact the vendor and tell them not to be making assumptions about the platform default encoding in such cases. If you have specific info and further questions, I'd be glad to help out. Gary > -----Original Message----- > From: java400-l-admin@midrange.com > [mailto:java400-l-admin@midrange.com] On Behalf Of David Gibbs > Sent: Monday, September 02, 2002 9:59 AM > To: java400-l@midrange.com > Subject: Possible dumb question: ASCII, EBCDIC, or Unicode? > > > Folks: > > This as the potential of being a dumb question ... what > character set does Java on the iSeries operate in? ASCII, > EBCDIC, or Unicode? > > Reason for question: I've got some pure java code running on > our system that is querying a service (via TCP) running on > another system (NT based). This query runs fine on NT and > Unix based Java's, but when we run the code on the iSeries, > it reports that Invalid data was returned from the service. > > The service, btw, is FlexLM ... it's a licensing system we > use for our Java products. > > I'm wondering if the FlexLM service is returning information > in ASCII, but the iSeries java is expecting it in EBCDIC? > > Thanks! > > david > -- > | Internet: david@midrange.com > | WWW: http://david.fallingrock.net > | AIM: MidrangeMan > | > | "this unit is the ultimate achievement in computer evolution" > | -- m5 > > > > > > > > > _______________________________________________ > This is the Java Programming on and around the iSeries / > AS400 (JAVA400-L) mailing list To post a message email: > JAVA400-L@midrange.com To subscribe, unsubscribe, or change > list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l > or email: JAVA400-L-request@midrange.com > 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.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.