
iconv converts characters in file (or from standard input if no file is specified) from one code page set to another. The converted text is written to standard output (stdout). See z/OS XL C/C++ Programming Guide for more information about the code sets supported for this command.
If the input contains a character that is not valid in the source code set, iconv replaces it with the byte 0xff and continues, unless the –c option is specified.
If the input contains a character that is not valid in the destination code set, behavior depends on the system's iconv() function. See z/OS XL C/C++ Runtime Library Reference for more information about the character used for converting incorrect characters.
Also, z/OS XL C/C++ Programming Guide has a list of code pages supported by the z/OS shell.
You can use iconv to convert single-byte data or double-byte data.
Specifies the source code set of the input. oldset can
be either the code set name that is known to the system, the numeric
coded character set identifier (CCSID), or a path name to a file containing
an external code set.
coded character
set
(as defined in the file tag) as the source code set. If –f is
also specified, and the oldset matches the
file tag or if there is no file tag code set, then oldset is
used as the source code set. If –F and –f are
specified and oldset does not match the
file tag code set, then iconv fails with
an error.
Specifies the destination code set for the output. newset can
be either the code set name that is known to the system, the numeric
coded character set identifier (CCSID), or a path name to a file containing
an external code set.
For information about file tagging and code set specifications, see z/OS UNIX System Services Planning.
iconv –f IBM-1047 –t ISO8859-1 words.txt > converted
Also, for the exact conversion table names, refer to z/OS XL C/C++ Programming Guide.
iconv –f IBM-932 –t IBM-939 mbcsdata > dbcsdata
See Localization for more information.
X/Open Portability Guide.
–v is an extension to the POSIX.2 standard. The –c, –l, and –s options are extensions to the XPG standard.