DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Specifying the locale

Translating files between different codesets

Use iconv(C) to translate files between different codesets. For example:

iconv -f local8 -t ISO8859-1 < infile > outfile

This converts infile from the local8 codeset to outfile in ISO8859-1 encoding. The character encoding in either the -f (from) codeset or the -t (to) codeset is in single-byte values (such as ISO8859-1 or ASCII).

You might need to translate files between different codesets if:


Although iconv is the recommended translation filter, the older trchan(M) utility is still available. trchan is a filter that acts in the same way as mapchan(M) and uses the same mapping files. For example, to translate a file from ISO8859-1 to US ASCII, where US ASCII is the character set currently in use, enter:

trchan -i /usr/lib/mapchan/ISO8859-1 < inputfile > outputfile

This command uses the input section of /usr/lib/mapchan/ISO8859-1 to translate inputfile, and writes the result to outputfile.


Next topic: Setting device character mapping
Previous topic: Setting the console codeset

© 2007 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 05 June 2007