Click here to Skip to main content
12,999,417 members (49,384 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

7K views
1 bookmarked
Posted 29 May 2012

C# EDIFACT File Corrector

, 29 May 2012
Rate this:
Please Sign up or sign in to vote.
Winform app to edit EDIFACT files to remove non-printable ASCII chars

Introduction

The winform app is used mainly to edit .EDI files so hidden and non-printable ascii chars can be removed or replaced by symbols the user wants to use. This tool is useful mainly to parse EDI files to XML using a purchased tool.

Background

Used mainly in business transactions, EDI files are of crucial interest and importance to IS nowadays. Sometimes, these files need to be read normally instead of the encoded form. Hence, before performing conversion, this tool helps adapting the file to any EDI converter.

Using the code 

The code mainly is about openning the .EDI file and correct it, the following piece of code is the most important one for you, it allows you to replace which hex ascii char with what you want.
private void button2_Click(object sender, EventArgs e)
   {
       ReplaceInFile("\x1D","+");
       ReplaceInFile("\x1F",":");
       ReplaceInFile("\x1C","'");
       //Add as many replaces as you want!
       MessageBox.Show("Done!");
   }   

Points of Interest

This app saves lot of time and frustration when handling EDI files, myself I was getting crazy looking for all the hidden ASCII chars! I just wanted to share it with you.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Mabchour 1989
Student
Morocco Morocco
I'm a graduate student in Transport and Logistics Management with a bachelor in computer science, I'm interested in supply chain informations systems. Great experience in programming with .net framework tools (C#, ASP).

You may also be interested in...

Comments and Discussions

 
QuestionMost libraries already do this, RDPCrystal EDI Library for instance Pin
FatCatProgrammer29-Mar-17 4:02
memberFatCatProgrammer29-Mar-17 4:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170624.1 | Last Updated 29 May 2012
Article Copyright 2012 by Mabchour 1989
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid