|
> > I'm sure it's sockets ... but I'm not sure of the internals > of how it's received. Do you have the source code for this? If not, there might be some method call or Properties or something to set the expected character set. > So if a iSeries based java program received text in ASCII, > via a socket, and converted it to a String or byte array, it > might not be able to understand the contents of the data > without explicitly declaring the character set? Remember the text is received into a byte array. If that happens to be in ASCII, which is probably is, and the program says to convert that to Unicode but interpret the bytes as if they're EBCDIC, then the conversion will not be properly performed. The statement String myString = new String(socketByteArray) will assume that the byte array contains ASCII on a non-iSeries machine but EBCDIC on an iSeries machine. So, the safest way when dealing with these things is to explicitly declare the character set used in the byte array. If you don't do that, the JVM will assume ASCII on a windows machine but EBCDIC on an iSeries. You can override this by changing the system property file.encoding but this will affect all of your I/O, not just the socket. If you have the source code for the the FlexLM stuff, I can show you where to correct it. Otherwise, you'll have to get the vendor to fix this bug. Does the vendor return the series of bytes to you or what? Gary
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.