Specifying the text conversion
Some commands that perform file input/output and, by default, allow automatic conversion of tagged files, allow the automatic code set conversion of files that are tagged as text with a code set. These commands use the filecodeset and pgmcodeset option (-W option to specify the text conversion. The explicit use of the filecodeset or pgmcodeset option (-W option on the command will override any automatic conversion, any use of the –B option to disable automatic conversion, as well as any text conversion indicated by the _TEXT_CONV environment variable
The filecodeset and pgmcodeset option (-W option) applies to the input text file that is processed by the command. Other files that are used by the command, such as a file list or configuration information, are not affected by the filecodeset and pgmcodeset option (-W option). When a command allows the use of the standard input (stdin) in place of the input text file, the filecodeset and pgmcodeset option (-W option) will be applied to the standard input (stdin) if it is not associated with a terminal.
The coded character set can be specified by using the code set
name or by using the numeric coded character set identifier (CCSID).
The command iconv -l lists existing numeric CCSIDs
along with their corresponding code set names.
Following are commands that can specify text conversion using the filecodeset or pgmcodeset option (-W option).
cmp
comm
cut
diff
dircmp
ed
egrep
ex
expand
fgrep
file
grep
head
more
paste
sed
strings
tail
unexpand
uniq
vi
wc