16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

iconv<br />

Options<br />

Localization<br />

Examples<br />

You can use iconv to convert singlebyte data or doublebyte data.<br />

–c Characters containing conversion errors are not written to the output. By<br />

default, characters not in the source character set are converted to the<br />

value 0xff and written to the output.<br />

–f oldset<br />

oldset can be either the codeset name or a pathname to a file containing an<br />

external codeset.<br />

–l Lists supported codesets and CCSIDs. (This option was accepted in<br />

releases prior to V1R3, but was not supported.)<br />

–s Suppresses all error messages about faulty encodings.<br />

–t newset<br />

Specifies the destination codeset for the output. newset can be either the<br />

codeset name or a pathname to a file containing an external codeset.<br />

–v Specifies verbose output.<br />

File Tag Specific Options<br />

–F Use the input file’s codeset (as defined in the file tag) as the source<br />

codeset. If –f is also specified, and the oldset matches the file tag<br />

or if there is no file tag codeset, then oldset is used as the source<br />

codeset. If –F and –f are specified and oldset does not match the<br />

file tag codeset, then iconv fails with an error.<br />

–M Tag a new output file as mixed, that is, the text flag (txtflag) will be<br />

off and the value for codeset will be the same as what’s specified<br />

on the –t option.<br />

–T Tag a new output file as text, that is, the txtflag will be on and the<br />

value for codeset will be the same as what’s specified on the –t<br />

option.<br />

For more information on file tagging and codeset specifications, see z/<strong>OS</strong> <strong>UNIX</strong><br />

<strong>System</strong> <strong>Services</strong> Planning.<br />

iconv uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_CTYPE<br />

v LC_MESSAGES<br />

v NLSPATH<br />

See Appendix F for more information.<br />

1. To convert the file words.txt from the IBM-1047 standard codeset to the ISO<br />

8859-1 standard codeset and store it in converted:<br />

iconv –f IBM-1047 –t ISO8859-1 words.txt > converted<br />

Also, for the exact conversion table names, refer to z/<strong>OS</strong> XL C/C++<br />

Programming Guide.<br />

310 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!