S
Sylvain
Hello,
----------------------------------------------------------------------------
--------------------------------
I am trying to encode/decode unicode to/from ebcdic character string. When I
try the following:
String sEbcdic = "1234567890abcdefghijklmnopqurstuvwxyz";
String sReencodedEbcdic = null;
try {
String sReturnEbcdic = (new String(new String(sEbcdic.getBytes(),
"8859_1").
getBytes("cp037")));
sReencodedEbcdic = (new String(new String(sReturnEbcdic.getBytes(),
"cp037").getBytes("8859_1")));
System.out.println(sReencodedEbcdic);
}
catch (java.io.UnsupportedEncodingException e) {}
----------------------------------------------------------------------------
--------------------------------
I am getting the following output:
1234567890bcdefghijklmnopqurstuvwxyz
The 'a' character is not converted back!
Anyone ever had this problem?
Thanks
Sylvain
----------------------------------------------------------------------------
--------------------------------
I am trying to encode/decode unicode to/from ebcdic character string. When I
try the following:
String sEbcdic = "1234567890abcdefghijklmnopqurstuvwxyz";
String sReencodedEbcdic = null;
try {
String sReturnEbcdic = (new String(new String(sEbcdic.getBytes(),
"8859_1").
getBytes("cp037")));
sReencodedEbcdic = (new String(new String(sReturnEbcdic.getBytes(),
"cp037").getBytes("8859_1")));
System.out.println(sReencodedEbcdic);
}
catch (java.io.UnsupportedEncodingException e) {}
----------------------------------------------------------------------------
--------------------------------
I am getting the following output:
1234567890bcdefghijklmnopqurstuvwxyz
The 'a' character is not converted back!
Anyone ever had this problem?
Thanks
Sylvain