473,326 Members | 2,655 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,326 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 4159
"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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.