473,395 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

EBCDIC file format to byte format

Hi

Is there some support for this file conversion in c#?
Thanks
Nov 16 '05 #1
6 4174
"R.A." <te**@citsecure.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
Is there some support for this file conversion in c#?


I'm sure Mr Skeet won't mind my stealing his thunder...:-)
http://www.eggheadcafe.com/articles/20030521.asp
Nov 16 '05 #2
DC
R.A. wrote:
Hi

Is there some support for this file conversion in c#?
Thanks

http://www.yoda.arachsys.com/csharp/ebcdic/

LP,
Dejan
Nov 16 '05 #3
Mark Rae <ma**@markrae.co.uk> wrote:
"R.A." <te**@citsecure.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
Is there some support for this file conversion in c#?


I'm sure Mr Skeet won't mind my stealing his thunder...:-)
http://www.eggheadcafe.com/articles/20030521.asp


Not at all.

I should emphasise, however, that the code is virtually untested by me,
and can't be tested in any significant way by me as I have no access to
a machine with real EBCDIC support. In that sense, it's a somewhat
bizarre project.

However, I have had emails from people who say it works. If anyone
finds any bugs, *please* let me know...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4
> Is there some support for this file conversion in c#?

You can use Encoding.GetEncoding with the following values:
37 = IBM EBCDIC - U.S./Canada
500 = IBM EBCDIC - International
870 = IBM EBCDIC - Multilingual/ROECE (Latin-2)
875 = IBM EBCDIC - Modern Greek
1026 = IBM EBCDIC - Turkish (Latin-5)
1047 = IBM EBCDIC - Latin-1/Open System
1140 = IBM EBCDIC - U.S./Canada (37 + Euro)
1141 = IBM EBCDIC - Germany (20273 + Euro)
1142 = IBM EBCDIC - Denmark/Norway (20277 + Euro)
1143 = IBM EBCDIC - Finland/Sweden (20278 + Euro)
1144 = IBM EBCDIC - Italy (20280 + Euro)
1145 = IBM EBCDIC - Latin America/Spain (20284 + Euro)
1146 = IBM EBCDIC - United Kingdom (20285 + Euro)
1147 = IBM EBCDIC - France (20297 + Euro)
1148 = IBM EBCDIC - International (500 + Euro)
1149 = IBM EBCDIC - Icelandic (20871 + Euro)
20273 = IBM EBCDIC - Germany
20277 = IBM EBCDIC - Denmark/Norway
20278 = IBM EBCDIC - Finland/Sweden
20280 = IBM EBCDIC - Italy
20284 = IBM EBCDIC - Latin America/Spain
20285 = IBM EBCDIC - United Kingdom
20290 = IBM EBCDIC - Japanese Katakana Extended
20297 = IBM EBCDIC - France
20420 = IBM EBCDIC - Arabic
20423 = IBM EBCDIC - Greek
20424 = IBM EBCDIC - Hebrew
20833 = IBM EBCDIC - Korean Extended
20838 = IBM EBCDIC - Thai
20871 = IBM EBCDIC - Icelandic
20880 = IBM EBCDIC - Cyrillic (Russian)
20905 = IBM EBCDIC - Turkish
20924 = IBM EBCDIC - Latin-1/Open System (1047 + Euro)
20924 = IBM EBCDIC - Latin-1/Open System (1047 + Euro)
20924 = IBM EBCDIC - Latin-1/Open System (1047 + Euro)
20924 = IBM EBCDIC - Latin-1/Open System (1047 + Euro)
21025 = IBM EBCDIC - Cyrillic (Serbian, Bulgarian)
--
Mihai
-------------------------
Replace _year_ with _ to get the real email
Nov 16 '05 #5
Mihai N. <nm**************@yahoo.com> wrote:
Is there some support for this file conversion in c#?


You can use Encoding.GetEncoding with the following values:


Damn. I wish I'd known that *before* writing my own encoding :(

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #6
> Damn. I wish I'd known that *before* writing my own encoding :(
No problem.

To quote somebody I know "every line of code you write
makes you a better person" :-)

--
Mihai
-------------------------
Replace _year_ with _ to get the real email
Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: John Leslie | last post by:
I need to write a string to a file in EBCDIC. Do I need to do it character by character using a translation table, or is there a function to translate the whole string? (I am aware that I can...
6
by: R.A. | last post by:
Hi Is there some support for this file conversion in c#? Thanks
2
by: Ranjan | last post by:
Hi folks! I am trying to convert EBCDIC file to ASCII file. the issues are 1) Can all EBCDIC file be converted to ASCII without loss of information.(There is one character cent sign which is not...
9
by: jeff M via .NET 247 | last post by:
I'm still having problems reading EBCDIC files. Currently itlooks like the lower range (0 to 127) is working. I have triedthe following code pages 20284, 20924, 1140, 37, 500 and 20127.By working I...
6
by: Ven | last post by:
Hi, I am reading a kind of below mentioned raw data into my C++ program and writing it out but I want this to be converted into EBCDIC format, how can I accomplish this ? Right now I am using...
4
by: =?Utf-8?B?ai5hLiBoYXJyaW1hbg==?= | last post by:
Hi, I have read the "how to's" on MSDN including this one, http://msdn2.microsoft.com/en-us/library/36b93480.aspx, on reading/writing files in C#, but haven't found something that I can put...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.