Re: convert ASCII to EBCDIC
- From: Paul Landay <landay@xxxxxxxxxx>
- Date: Thu, 29 Jun 2006 06:35:42 -0400
jbercx@xxxxxxxx wrote:
we use the dd command to convert a ASCII file to EBCDIC. After
conversion we ftp this file to a mainframe for further use of it.
This file contains records with customer names. Sometimes a name has a
ó in it like mr. Bókhoven. The convertion of this name is not
correct. It replace the ó with a ^.
How can we convert this correct. We tried these commands with the same
incorrect result.
dd if=textin of=textof conv=ebcdic
dd if=textin of=textof conv=ibm
The 'dd conv=' is rather limited in its ebcdic translation.
The 'man conv' says:
The character-set mappings associated with ... conv=ebcdic
... subset of EBCDIC characters found on most ...
Note the words "subset" and "most".
I suggest you use the 'iconv' command, which can use a larger
set of code pages. The trick will be finding the code page
which has the EBCDIC ó in it. Start with 'man iconv' and/or
'smit iconv'. You will also want to install as many of the
bos.iconv.* filesets as needed to find the right code page.
In your case install at least bos.iconv.ucs.ebcdic.
If you can't find a enbdic code page which already contains
the characters you need you can create a custom iconv table
with the genxlt command.
Paul Landay
.
- Follow-Ups:
- Re: convert ASCII to EBCDIC
- From: jbercx@xxxxxxxx
- Re: convert ASCII to EBCDIC
- References:
- convert ASCII to EBCDIC
- From: jbercx@xxxxxxxx
- convert ASCII to EBCDIC
- Prev by Date: Re: Is there hardware documentation for p5 model 520's Ethernet port lights?
- Next by Date: Re: 2 port ethernet
- Previous by thread: convert ASCII to EBCDIC
- Next by thread: Re: convert ASCII to EBCDIC
- Index(es):
Relevant Pages
|