View previous topic :: View next topic
|
Author |
Message |
sandhyarenu
New User
Joined: 04 Jan 2007 Posts: 16 Location: India
|
|
|
|
Hi,
Could someone help with a sampe Cobol Code that converts UTF-8 data to EBCDIC and vice versa ? Thanks much in advance. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello sandhyarenu and welcome to the forums,
Please clarify your requirement.
UTF-8 does not directly "convert" to EBCDIC.
If you show some sample data and what you want to do with it, someone may have a suggestion. |
|
Back to top |
|
|
sandhyarenu
New User
Joined: 04 Jan 2007 Posts: 16 Location: India
|
|
|
|
Thanks for the quick updates. My requirement however plainly states that a cobol code is to be developed which takes file containing UTF-8 data as input and converts it to EBCDIC which will form the o/p file so that a normal mainframe cobol code is compatible with the data. I googled and found some sample codes which do ASCII-EBCDIC conversions but not UTF-8 ! And, I did not quite understand dick's response as to why UTF-8 cannot be converted to EBCDIC. Is there a normalisation required like using the Function National() which converts UTF/EBCDIC data to national format before further conversion ? I hope I make myself clear. Any thoughts ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
where does the file come from??
if it is ftp'ed then ftp will take care of it ( IIRC ) |
|
Back to top |
|
|
sandhyarenu
New User
Joined: 04 Jan 2007 Posts: 16 Location: India
|
|
|
|
I don't think it's ftped. Atleast in my requirement, I need to come up with a test file containing UTF-8 data(manually created). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
not quite understand dick's response as to why UTF-8 cannot be converted to EBCDIC |
I believe you missed a rather inportant word - directly.
This http://www.unicode.org/reports/tr16/ is probably more than you want, but you might take a look at it. |
|
Back to top |
|
|
sandhyarenu
New User
Joined: 04 Jan 2007 Posts: 16 Location: India
|
|
|
|
Absolutely, Dick ! My mistake.. |
|
Back to top |
|
|
sandhyarenu
New User
Joined: 04 Jan 2007 Posts: 16 Location: India
|
|
|
|
Dick, The link is more of theory and I really couldn't trace a cobol code for the conversion I am looking for. |
|
Back to top |
|
|
sandhyarenu
New User
Joined: 04 Jan 2007 Posts: 16 Location: India
|
|
|
|
I found that UTF-16 could be converted to and from an EBCDIC data. Now my task is to convert UTF-8 to & from a UTF-16 data. Any inputs to this ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
--> sandhyarenu
Do you have what you need?
Where does your UTFx input originate? |
|
Back to top |
|
|
|