trcs(1)
β¨ NAME β¨
trcs β convert text files from one codeset to other π¦
πΈ SYNOPSIS πΈ
trcs -C | -l | -h
trcs [-s] [-f input-codeset ] [-t output-codeset ] [ file ]...
π DESCRIPTION π
okay so bestie, trcs is literally the program for translating your text files from one codeset into another. periodt. π₯
And the way it handles things when a perfect translation just isn't possible? It approximates. Like, it genuinely tries its best. For example: pseudographic characters get approximated by ASCII characters in codesets that don't have pseudographic characters, and characters with diacritical marks get approximated by characters that do exist. it's giving "we'll make it work" energy π
If you pass the option -s or --gen-script, trcs will generate a simple script that invokes tr(1). This is useful if you want to include this in your script or for faster conversion of many files. no cap, it's a whole shortcut moment. β¨
If none of -C, -s, -l, -h and their equivalents is given, each file will be read assuming it is coded with codeset input-codeset. On standard output it will be recoded so as to use codeset output-codeset. If there is no file given, trcs will act as filter. Both input-codeset and output-codeset are case insensitive and default to cp1251. π
π OPTIONS π
-C,--copyrightβ Display copying conditions and warranty information. (the legal lore π)-s,--gen-scriptβ Generates conversion script for given input and output encodings instead of converting text files.-l,--listβ List all known codesets with their aliases. it's giving directory of every codeset's government name π-h,--helpβ Display this help and exit. π«Ά-f input-codeset,--from[=]input-codesetβ Codeset of the source.-f output-codeset,--to[=]output-codesetβ Codeset of the output.
π EXAMPLES π
trcs -fcyrillic -t koi8-r letter.txt
Convert letter.txt from ISO-8859-5 (cyrillic) to KOI8-R and output the result on standard output. π«
trcs -fcyrillic -t koi8-r letter.txt
trcs --from cp437 --to=mik --gen-script >ibm2mik
Generates script ibm2mik for converting from CP437 to MIK. π§
trcs --from cp437 --to=mik --gen-script >ibm2mik
sh ibm2mik screen.txt
Convert screen.txt from CP437 to MIK. Output the result on standard output. Without parameters ibm2mik acts as filter. πΈ
sh ibm2mik screen.txt
π AUTHOR π
Anton Zinoviev <anton@lml.bas.bg>, <zinoviev@fmi.uni-sofia.bg>
π¦ SEE ALSO π¦
and that's the whole page bestie, we ate and left absolutely no crumbs π β¨
this one's from the Linux User Manuals, dated JUN 2000, and it's page trcs(1) β mwah, stan a classic πππ
π¦ where this page comes from
- debian bookworm: trscripts 1.18+nmu3 Β· GPL-2.0-or-later
- debian trixie: trscripts 1.18+nmu3 Β· GPL-2.0-or-later
- ubuntu jammy: trscripts 1.18+nmu3 Β· GPL-2.0-or-later
- ubuntu noble: trscripts 1.18+nmu3 Β· GPL-2.0-or-later
- ubuntu questing: trscripts 1.18+nmu3
- ubuntu resolute: trscripts 1.18+nmu3build1 Β· GPL-2.0-or-later
- ubuntu stonking: trscripts 1.18+nmu3build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms