| Author |
EBCDIC Conversion in groovy
|
Nishiru San
Greenhorn
Joined: Feb 07, 2013
Posts: 3
|
|
I was trying for ASCII to EBCDIC conversion in groovy
I was trying to write hex value 81 and 82 ( which are EBCDIC hex values for a and b) to a file.
Please find the code below
But the code writes hex value 3F and 82 to the file. It seems that when i give byte(0x81) it is not resolving and putting 3F which means character '?' in ASCII. All other hex values are fine.
I have tried this in Windows 7 32 bit machine. Tried the same code in Oracle Enterprise 5 Linux 64 bit machine. Surprisingly the same code wrote 'EFBF EFBF' in the file .
Can someone advice on this.
|
 |
Nishiru San
Greenhorn
Joined: Feb 07, 2013
Posts: 3
|
|
|
Instead of f.write used f.setBytes to solve the issue
|
 |
 |
|
|
subject: EBCDIC Conversion in groovy
|
|
|