Solved

ASCII to EBCDIC conversion and vice versa

Posted on 2002-07-02
4
687 Views
Last Modified: 2010-09-23
i'm currently developing a utility to convert ASCII to EBCDIC (to support translation of some bits in a legacy system). really stuck over here.

some sample codes are appreciated. hope someone here can guide me (either conceptually or otherwise).
0
Comment
Question by:emily_my
  • 2
  • 2
4 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 7125123
Conceptually, what you need to do is build a conversion table. For EBCDIC to ASCII, you would read a character in EBCDIC, find the ASCII equivalent in the table and write that out to a stream or file. The process would be reversed for ASCII to EBCDIC.
0
 
LVL 4

Expert Comment

by:pagladasu
ID: 7125238
here is a link to a piece of code in C that might be useful to you.
http://www.room42.com/store/computer_center/c_translate.shtml
0
 
LVL 4

Accepted Solution

by:
pagladasu earned 50 total points
ID: 7125248
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 7128699
pagladasu, that certainly is a start, but there are some problems: in descending order of importance:

1. If performance is an issue, e.g. in decoding long streams, constantly iterating the array like this is inefficient. In this respect, the C code is better.
2. The Java code uses proprietary code.
3. It doesn't translate both ways, as claimed

emily_my, you only need (maybe) to concern yourself with the first point.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
mergeTwo  challenge 13 71
Starting to learn JAVA, 7 47
Checkbox and ListView in Android Layout 4 37
github account with ecipse 1 16
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now