TCS(1)

πŸ“¦
version 0_git20260208 Β· 2 versions
, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable

πŸ’… TCS(1) β€” the translate-character-sets girlies' page πŸ’…

okay so this is tcs, from the General Commands Manual β€” yes bestie, section 1, we're in the big leagues. she translates character sets and she does it flawlessly. πŸŽ€


✨ NAME ✨

tcs β€” translate character sets πŸ¦‹ like literally that's her whole job and she ate


✨ SYNOPSIS ✨

tcs [ -slcv ] [ -f ics ] [ -t ocs ] [ file ...  ]

🌸 DESCRIPTION 🌸

okay so here's the vibe πŸ’–: tcs takes the file(s) you name (or standard input if you don't name any β€” that's the default, no cap), reads them as a stream of characters from the ics character set or format, converts those bad boys into runes, and then converts them again into a stream of characters from the ocs character set or format, which goes out on standard output. icon behavior, honestly. πŸ‘‘

the default value for both ics and ocs is utf β€” that's the UTF encoding, the one described over in utf(7). 🫢

  • the -l option lists the character sets that tcs knows about
  • processing keeps going even when it hits conversion errors (-s stops those errors from being reported, so she just quietly moves on πŸ’€)
  • the -c option forces the output to contain only correctly converted characters. without it? 0x80 characters get substituted in for UTF encoding errors, and 0xFFFD characters get substituted in for unknown characters. so like, errors show up in your output but at least they're documented errors, iykyk 😭
  • the -v option generates various diagnostic and summary information on standard error β€” or, if you're using -l, it makes that -l output more verbose πŸ”₯
ngl, tcs recognizes an ever changing list of character sets. like she's always growing, always evolving, main character energy. in particular she supports a variety of Russian and Japanese encodings. 🧚

some of the supported encodings are:

  • utf β€” the Plan 9 UTF encoding, known by ISO as UTF-8 ⭐
  • utf1 β€” the deprecated original UTF encoding from ISO 10646 πŸ™ˆ (yes deprecated, be careful bestie)
  • ascii β€” 7-bit ASCII
  • 8859-1 β€” Latin-1 (Central European)
  • 8859-2 β€” Latin-2 (Czech .. Slovak)
  • 8859-3 β€” Latin-3 (Dutch .. Turkish)
  • 8859-4 β€” Latin-4 (Scandinavian)
  • 8859-5 β€” Part 5 (Cyrillic)
  • 8859-6 β€” Part 6 (Arabic)
  • 8859-7 β€” Part 7 (Greek)
  • 8859-8 β€” Part 8 (Hebrew)
  • 8859-9 β€” Latin-5 (Finnish .. Portuguese)
  • koi8 β€” KOI-8 (GOST 19769-74)
  • jis-kanji β€” ISO 2022-JP
  • ujis β€” EUC-JX: JIS 0208
  • ms-kanji β€” Microsoft, or Shift-JIS
  • jis β€” (from only) guesses between ISO 2022-JP, EUC or Shift-Jis πŸ‘€ she's guessing but she's confident
  • gb β€” Chinese national standard (GB2312-80)
  • big5 β€” Big 5 (HKU version)
  • unicode β€” Unicode Standard 1.0
  • tis β€” Thai character set plus ASCII (TIS 620-1986)
  • msdos β€” IBM PC: CP 437
  • atari β€” Atari-ST character set

πŸ¦‹ EXAMPLES πŸ¦‹

  • tcs -f 8859-1 β€” convert 8859-1 (Latin-1) characters into UTF format ✨
  • tcs -s -f jis β€” convert characters encoded in one of several shift JIS encodings into UTF format. unknown Kanji will be converted into 0xFFFD characters 🫢
  • tcs -lv β€” print an up to date list of the supported character sets, slay πŸ’…

πŸŽ€ SOURCE πŸŽ€

/src/cmd/tcs

🌈 SEE ALSO 🌈

ascii(1), rune(3), utf(7). go read them, bestie, they're literally right there πŸ’œ


okay that's the whole page!! this was TCS(1) from the General Commands Manual β€” no date or version on this one, she's timeless like that β­πŸ’– periodt πŸŽ€