1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
.\" Process this file with
.\" groff -man -Tascii trcs.1
.\"
.TH trcs 1 "JUN 2000" Linux "User Manuals"
.SH NAME
trcs \- convert text files from one codeset to other
.SH SYNOPSIS
.B trcs -C | -l | -h
.B trcs [-s] [-f
.I input-codeset
.B ] [-t
.I output-codeset
.B ] [
.I file
.B ]...
.SH DESCRIPTION
.B trcs
is a program for translation of text files from one codeset to other.
When exact translation is impossible it tries to make approximations.
For example pseudographic characters are approximated by ASCII
characters in codesets that have no pseudographic characters and
characters with diacritical marks are approximated by existing
characters.
If the option
.B -s
or
.B --gen-script
is given
.B trcs
will generate simple script that invokes
.BR tr (1)
This is useful if you want to include this in your script or for
faster conversion of many files.
If none of
.BR \-C,
.BR \-s,
.BR \-l,
.BR \-h
and their equivalents is given each
.I file
will be read assuming it is coded with codeset
.I "input-codeset"
On standard output it will be recoded so to use codeset
.I "output-codeset"
If there is no
.I file
given
.B trcs
will act as filter. Both
.I "input-codeset"
and
.I "output-codeset"
are case insensitive and default to `cp1251'.
.SH OPTIONS
.IP "-C, --copyright"
Display copying conditions and warranty information.
.IP "-s, --gen-script"
Generates conversion script for given input and output encodings
instead to convert text files.
.IP "-l, --list"
List all known codesets with their aliases.
.IP "-h, --help"
Display this help and exit.
.IP "-f input-codeset, --from[=]input-codeset"
Codeset of the source.
.IP "-f output-codeset, --to[=]output-codeset"
Codeset of the output.
.SH EXAMPLES
.IP "trcs -fcyrillic -t koi8-r letter.txt"
Convert
.I letter.txt
from ISO-8859-5 (cyrillic) to KOI8-R and output the
result on standard output.
.IP "trcs --from cp437 --to=mik --gen-script >ibm2mik"
Generates script
.I ibm2mik
for converting from CP437 to MIK.
.IP "sh ibm2mik screen.txt"
Convert
.I screen.txt
from CP437 to MIK. Output the result on standard output. Without
parameters
.I ibm2mik
acts as filter.
.SH AUTHOR
Anton Zinoviev <anton@lml.bas.bg>, <zinoviev@fmi.uni-sofia.bg>
.SH "SEE ALSO"
.BR tr (1)
|