Problem with converting EBCDIC to ASCII
Moderators: chulett, rschirm, roy
I would suggest keeping the problem simple. How are you converting the EBCDIC to ASCII in your jobs? What version of EBCDIC do you have (there are several)?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Hmmm... sort of; the first 7-bit implementation of ASCII did not have any of the extended characters, but 8-bit ASCII with the diacritics and other characters has been around as an ISO standard (ISO646) since 1972 and today "ASCII" is pretty much synonymous with the extended 8 bit representation.PhilHibbs wrote:Those characters don't exist in ASCII...
Nevertheless your mail is spot-on in that the original poster needs to know which EBCDIC representation is being used and which character set it is being converted to.
Retraction - I just checked up on Wiki and see that official "ASCII" indeed remains as a 7-bit encoding and thus the diacritics and special characters are not part of ASCII. Thanks for the pointer!
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 26
- Joined: Mon Nov 19, 2007 2:55 am
- Location: Hangzhou
actually I have 4 columns have those diacritics characters, and I am not sure how many different diacritics characters will be used in the column.
does that mean if I wanna convert those characters correctly, first I must enable NLS,then code as PhilHibbs post to replace all diacritics characters with Unicode characters?
Thanks for help!
does that mean if I wanna convert those characters correctly, first I must enable NLS,then code as PhilHibbs post to replace all diacritics characters with Unicode characters?
Thanks for help!
-
- Participant
- Posts: 26
- Joined: Mon Nov 19, 2007 2:55 am
- Location: Hangzhou
actually I have 4 columns have those diacritics characters, and I am not sure how many different diacritics characters will be used in the column.
does that mean if I wanna convert those characters correctly, first I must enable NLS,then code as PhilHibbs post to replace all diacritics characters with Unicode characters?
Thanks for help!
does that mean if I wanna convert those characters correctly, first I must enable NLS,then code as PhilHibbs post to replace all diacritics characters with Unicode characters?
Thanks for help!
If you don't have NLS enabled this EBCDIC to ASCII conversion should work. Can you narrow it down to one character in EBCDIC and show the numeric value in EBCDIC and then the value after it is converted to ASCII?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
I played around in Server and had the same issues with the characters in the upper range of ASCII.
Have you tried to see what happens when the FTP program takes care of the conversion from EBCDIC to ASCII - it might handle the characters appropriately.
Finally, you might have to revert to what Phil has already posted above.
Have you tried to see what happens when the FTP program takes care of the conversion from EBCDIC to ASCII - it might handle the characters appropriately.
Finally, you might have to revert to what Phil has already posted above.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 7
- Joined: Mon Dec 17, 2007 1:37 am
- Location: Boston, MA
Yes, but you can use the CHAR() function and drop the multibyte character.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 26
- Joined: Mon Nov 19, 2007 2:55 am
- Location: Hangzhou
No, you don't need to enable NLS. Could you explain your problem with the CHAR() function - I don't see it having a problem with the full ASCII set.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 26
- Joined: Mon Nov 19, 2007 2:55 am
- Location: Hangzhou