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 πŸ¦‹

tr(1)


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 πŸŽ€πŸ’–πŸŒˆ