example EBCDIC file for Java program to convert EBCDIC to ASCII -


i trying convert ebcdic file ascii using following code :

inputstreamreader rdr = new inputstreamreader(new fileinputstream(<your file>),java.nio.charset.forname("ibm500"));         while((string line = rdr.readline()) != null) {         system.out.println(line); 

i trying find sample file in ebcdic format send input program. can please point me sample file. can't find online.

you can use iconv utility on unix convert between character encodings. available windows (it's optional package can install in cygwin, example). can use dd command convert character encodings.

dd if=ascii.txt of=ebcdic.txt conv=ebcdic

you should able use java conversion in other direction way you're doing it. read file ascii , write ebcdic.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -