I need to write a 'simple' util to convert from ASCII to EBCDIC?
The Ascii is coming from Java, Web and going to an AS400. I've had a google around, can't seem to find a easy solution (maybe coz there isn't one :( ). I was hoping for an opensource util or paid for util that has already been written.
Like this maybe?
Converter.convertToAscii(String textFromAS400)
Converter.convertToEBCDIC(String textFromJava)
Thanks,
Scott
You can create one yoursef with this translation table.
But here is a site that has a link to a Java example.
This is what I've been using.
It should be fairly simple to write a map for the EBCDIC character set, and one for the ASCII character set, and in each return the character representation of the other. Then just loop over the string to translate, and look up each character in the map and append it to an output string.
I don't know if there are any converter's publicly available, but it shouldn't take more than an hour or so to write one.