EBCDIC - UTF-8: iconv usage as command line program - IBM AS400
This is a discussion on EBCDIC - UTF-8: iconv usage as command line program - IBM AS400 ; Be forewarned: qsh usage here.
I have a file on IFS, tinytest.xml. I'm supposing that the IFS uses
EBCDIC. I've never run iconv as a commandline utility. I'd like to
give it a whirl though but it doesn't seem to ...
-
EBCDIC - UTF-8: iconv usage as command line program
Be forewarned: qsh usage here.
I have a file on IFS, tinytest.xml. I'm supposing that the IFS uses
EBCDIC. I've never run iconv as a commandline utility. I'd like to
give it a whirl though but it doesn't seem to be doing anything. No
warnings or messages either.
If I 'cat' my tinytest.xml file it displays fine on my CA session.
iconv -f EBCDIC -t UTF-8 tinytest.xml > tinytest_utf-8.xml
The result of this command is a file identical to tinytest.xml. The
'diff' command proves it.
I guess problem #1 is where in the world do you go to look up the
strings that the -f and -t arguments are using? Anyway, my search
continues. Thank you.
-
Re: EBCDIC - UTF-8: iconv usage as command line program
Mr. K.V.B.L. wrote:
> Be forewarned: qsh usage here.
>
> I have a file on IFS, tinytest.xml. I'm supposing that the IFS uses
> EBCDIC. I've never run iconv as a commandline utility. I'd like to
> give it a whirl though but it doesn't seem to be doing anything. No
> warnings or messages either.
>
> If I 'cat' my tinytest.xml file it displays fine on my CA session.
>
> iconv -f EBCDIC -t UTF-8 tinytest.xml > tinytest_utf-8.xml
>
> The result of this command is a file identical to tinytest.xml. The
> 'diff' command proves it.
>
> I guess problem #1 is where in the world do you go to look up the
> strings that the -f and -t arguments are using? Anyway, my search
> continues. Thank you.
I've not used this iconv utility, but google found this link with a
short description:
http://publib.boulder.ibm.com/infoce...zahz/rzahz.pdf
The "-f EBCDIC" looks odd to me, in that there are a large number of
CCSIDs considered "EBCDIC". My guess is that numeric (specific) CCSID
values are expected for -f and -t arguments. For example 37 and 500 are
a couple registered EBCDIC CCSIDs. This is a section of the SQL
Reference with some CCSID info:
http://publib.boulder.ibm.com/infoce...ode=int_213148
>>I'm supposing that the IFS uses EBCDIC.
Data in IFS files can be in a variety of character encodings. On a
green-screen if you find a file using WRKLNK, use option 8=Display
attributes to see the CCSID (Coded character set ID)
http://publib.boulder.ibm.com/infoce...ode=int_213324
--
Karl Hanson
-
Re: EBCDIC - UTF-8: iconv usage as command line program
On Aug 29, 6:14*pm, Karl Hanson wrote:
> Mr. K.V.B.L. wrote:
> > Be forewarned: qsh usage here.
>
> > I have a file on IFS, tinytest.xml. *I'm supposing that the IFS uses
> > EBCDIC. *I've never run iconv as a commandline utility. *I'd like to
> > give it a whirl though but it doesn't seem to be doing anything. *No
> > warnings or messages either.
>
> > If I 'cat' my tinytest.xml file it displays fine on my CA session.
>
> > iconv -f EBCDIC -t UTF-8 tinytest.xml > tinytest_utf-8.xml
>
> > The result of this command is a file identical to tinytest.xml. *The
> > 'diff' command proves it.
>
> > I guess problem #1 is where in the world do you go to look up the
> > strings that the -f and -t arguments are using? *Anyway, my search
> > continues. *Thank you.
>
> I've not used this iconv utility, but google found this link with a
> short description:http://publib.boulder.ibm.com/infoce...opic/rzahz/rza...
>
> The "-f EBCDIC" looks odd to me, in that there are a large number of
> CCSIDs considered "EBCDIC". My guess is that numeric (specific) CCSID
> values are expected for -f and -t arguments. For example 37 and 500 are
> a couple registered EBCDIC CCSIDs. This is a section of the SQL
> Reference with some CCSID info:http://publib.boulder.ibm.com/infoce...i5os/index.jsp...
>
> *>>I'm supposing that the IFS uses EBCDIC.
>
> Data in IFS files can be in a variety of character encodings. On a
> green-screen if you find a file using WRKLNK, use option 8=Display
> attributes to see the CCSID (Coded character set ID)http://publib.boulder..ibm.com/infoc...i5os/index.jsp...
>
> --
> Karl Hanson- Hide quoted text -
>
> - Show quoted text -
Or in qsh use ls -S to show the CCSID
Jonathan