[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-core-dev] ASCII-EBCDIC issues
|
Hi Paul,
Last week was when we first learned of the EBCDIC encoding problem with the
DataStore communication layer on 390. I think we didn't see this problem
on AS400 because their java changes the encoding to unicode, while on 390
the platform encoding (EBCDIC is used).
I think the problem is as follows:
The Sender sends bytes to the receiver using PrintStream. PrintStream
converts bytes to use the platform encoding.
The Receiver receives bytes and tries to cast them into a String. This is
a problem if the encodings of the client and server don't match.
It doesn't really make sense to use PrintStream because the data we
transfer (java strings) is in unicode. In the end, the receiver wants
unicode. So it makes sense to use unicode (UTF-8) rather than the platform
encoding to send. Instead of using PrintStream, we should use
OutputStreamWriter and specify UTF-8 as the encoding. On the receiver
side, it makes sense to use InputStreamWriter and specify UTF-8 as the
encoding rather than BufferedInputStream.
There are actually two types of data being transmitted in the communication
layer. First, we transfer data (which should always be unicode), but we
also transfer files and, for files, unicode is not always the right thing
to use. So I'm thinking that we need to use the current byte transfer
streams for files but use unicode for data transfer.
This is really our first encounter with 390, so currently this is the only
problem I know about. I think all the code that needs changing is in
XMLgenerator, XMLparser, Sender, Receiver and DataStore. I'm looking into
making these changes right now, although I'm not sure how I'm going to test
them.
____________________________________
David McKnight
Linux AD, CDT Development
Phone: 905-413-3902 , T/L: 969-3902
Internet: dmcknigh@xxxxxxxxxx
Mail: D2/ 329/8200/TOR
____________________________________
Paul
Sutera/Poughkeepsie/ To: cdt-core-dev@xxxxxxxxxxx
IBM@IBMUS cc:
Sent by: Subject: [cdt-core-dev] ASCII-EBCDIC issues
cdt-core-dev-admin@e
clipse.org
03/05/2002 04:07 PM
Please respond to
cdt-core-dev
I'm trying to use the Eclipse CDT server on USS OS/390 Release 9. I have
downloaded the latest JDK.
Right away I noticed there were problems with the input stream as the
client is Linux/390...
and that is ASCII based. On new String construction I forced a conversion
to ASCII. For some reason java on USS tried to
convert ASCII characters in the input byte stream to EBCDIC. Which
caused an ABEND on parsing.
Converting to ASCII got me past an abend. Now I'm basically sending the
request (to view some remote files) from the Eclipse client again.
And getting quite a bit further, but after a certain point, it fails.
The Linux to Linux solution works fine...
Not using the Daemon ....just the server.
I guess I'm still thinking it's ASCII-EBCDIC. Where the information to
open the files or even interface with the filesystem
should still be in EBDCIC. to create a simple project with 3 sample C
files that are, afterall EBCDIC in the directory, and EBCDIC inside
the files themselves.
If I knew all the ASCII/EBCDIC problems and where they needed to be
addressed, that would help immensely.
/Paul Sutera
Dept B9LD/P385 Phone: (845)435-1925
_______________________________________________
cdt-core-dev mailing list
cdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-core-dev