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

Translating files between different codesets

Use iconv(1) 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(1) utility is still available. trchan is a filter that acts in the same way as mapchan(1M) 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/iso < inputfile > outputfile

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


Next topic: Changing the system time zone
Previous topic: Setting the console codeset

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004