TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
deepa
NA
42
0
Converting string data(which contains EBCDIC, Packed decimal and Endian data) to byte array
Aug 24 2009 4:54 AM
Hi,
I need to convert string which has EBCDIC, packed decimal and Endian data to byteArray to save it in the database. I tried the following code.
Byte[] updateByte;
updateByte = System.Text.Encoding.Default.GetBytes(strData);
//here, strData is the string
Here what happens is it converts some characters to '?' with decimal value 63. For e.g. abc(ASCII vale) after converting to EBCDIC i get [129 130 131](these are decimal values of the converted EBCDIC data). When i convert the string to byte array in order to save it in database, it changes all three characters(129, 130 and 131) to 63. This mostly happens with small case alpbhbets.
I also tried other encoding(EBCDIC-US) but this also changes more characters.
IMP: Please note that the string that i need to convert to byte array contains EBCDIC, Packed decimal and Also Endian data.
Kindly let me know how i can achieve this.
Thanks,
Deepa
Reply
Answers (
0
)
How do I code my Class Library so it is registerable by Regsvr32?
Create a table through code